i have to do in such a way that when i drag a list from ul id[sortable1]
and drop on li
of ul id[sortable2]
both can change their place
I mean if i can drag a list from sortable 1 and drop to sortable 2 then sortable 2 list can placed in sortable 1 and sortable 1 list can placed in sortable 2
For ex. if i can drag item1 and drop to item6 then item6 can place on item1 and item1 on item 6
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function() {
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable"
}).disableSelection();
});
</script>
</head>
<body>
<ul id="sortable1" class="connectedSortable">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
</ul>
<ul id="sortable2" class="connectedSortable">
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
<li>Item 9</li>
<li>Item 10</li>
</ul>
</body>
</html>