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

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -