jQuery UI sortable - Change CSS class while dragging over specific element
I'm searching for a possibility to change the CSS class of an element in a sortable jQuery list while dragging over a specific element. For example if I drag an element of a sortable list over a specific layer, the dragging layer should change the background color but still stay in the dragging mode.
Does any开发者_运维问答body know if and how that could be done?
You could use the 'over' event:
$( ".selector" ).sortable({
over: function(event, ui) { ... }
});
http://jqueryui.com/demos/sortable/#event-over
精彩评论