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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -