Preserving Click Events With jQuery UI
By Forrest Smith - Drempd.com
My click events weren\’t being preserved when using the jquery sortable functionality. After dragging a list item around, elements like my checkboxes would no longer work, and not just for the element that was being dragged, but for any of the checkboxes in the entire list. It took a bit of searching, but to get this working, you need to add the \’helper: clone\’ option, so something like:
$( ".selector" ).sortable({ helper: "clone" });
This solved the click event issue, but brought up another issue. Basically whenever a clicked to drag a list item, it would \’highlight\’ all of the elements below the selected list item. I was using an older copy of the jquery ui, and the solution to this issue was to just upgrade my copy.
-
Adventure
-
The Built Environment
-
Locations
-
Web Dev