I have a two <ul>
lists connected up with jQuery UI Sortable.
I need items to be dragged and dropped from one list to the other and have used connectWith: "ul"
as demonstrated below:
$("ul.droptrue").sortable({
connectWith: "ul",
receive: function (event, ui) {
...
This fires absolutely fine and works as expected.
How can I listen for reorder events within the individual lists themselves?
I tried using sort: function (event, ui)
, however this seems to listen for all movement.
If anybody could suggest the best way to achive this, I'd appreciate it.
Here are my lists
<ul id="otpages1" class='droptrue'>
<li id="item-1" class="ui-state-default">Item 1</li>
<li id="item-1" class="ui-state-default">Item 2</li>
</ul>
<ul id="otpages2" class='droptrue'>
<li id="item-2" class="ui-state-highlight">Item 1</li>
<li id="item-2" class="ui-state-highlight">Item 2</li>
</ul>