sortable list to checkbox list JQuery with minimal code change

immephevezece

New Member
Currently i have a list of sortable elements with a text:
tKdug.jpg
How can i change it to a list of checkboxes with labels with the least code change?
0jZd3.jpg
Current Code:\[code\]<div class='left'><ul id="sortable"> <li class="ui-state-highlight"></li> <li class="ui-state-highlight"></li> <li class="ui-state-highlight"></li></ul></div>\[/code\]Script\[code\]<script> $(function() { $( "#sortable" ).sortable({ items: "li:not(.ui-state-highlight)", placeholder: "ui-state-highlight" }); $( "#sortable" ).disableSelection(); }); </script>\[/code\]Javascript \[code\] var nodes = document.getElementById('sortable').getElementsByClassName('ui-state-highlight'); if (nodes.length > 0) { nodes[0].innerHTML = getSymbol(); nodes[0].setAttribute("class", "ui-state-default"); }\[/code\]
 
Back
Top