jquery - I want to add class in the container while dropping a div in the container -
i using "jquery.sortable.js" create drag , drop following code
js
<script> $(function() { $('.sortable').sortable(); $('.handles').sortable({ handle: 'span' }); $('.connected').sortable({ connectwith: '.connected' }); $('.exclude').sortable({ items: ':not(.disabled)' }); }); </script>
html
<ul class="connected list"> <li>customer</li> <li>orders</li> <li>inventory</li> <li>shipping</li> </ul> <ul class="connected list no2"></ul>
while drag , drop working want class in second "connected" box while dragging item on it.
looking solution on unable find it.
check jquery ui documentation droppable method used sortable.
you can see example here.
Comments
Post a Comment