开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜