I am sure this is much simpler to do within the default drag and drop,
but I am not sure how to go about doing it. So if any one has examples
using drag and drop or the sortable interaction I would greatly
appreciate it.

==================

If I took an unordered list:

<ul id="sortable">
  <li>A</li>
  <li>B</li>
  <li>C</li>
  <li>D</li>
  <li>E</li>
</ul>

If I then applied the sortable interaction to it and moved A to D it
would then look like:
<script>
$("#sortable").sortable({
  placeholder: 'ui-state-highlight',
  containment: '#containment-wrapper',
  revert: true,
});
$("#sortable").disableSelection();
</script>
<ul id="sortable">
  <li>B</li>
  <li>C</li>
  <li>D</li>
  <li>A</li>
  <li>E</li>
</ul>

But what if I wanted both A and D to swap their positions:

<ul id="sortable">
  <li>D</li>
  <li>B</li>
  <li>C</li>
  <li>A</li>
  <li>E</li>
</ul>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to