jquery droppable accept condition
How can i put a second accept condition for a droppable element in jquery ?
accept: ":not(.ui-sortable-开发者_如何学Gohelper)",
accept: function() {
if($("#playlist li").length <=<?php echo $max_item; ?>) return true;
},
This don't work
Thanks
Using a function is more flexible than using a selector - since it allows to do the same. I would put the whole condition in the function, as follows:
accept: function(element) {
return (your_condition_1
&& !(element.hasClass('ui-sortable-helper'))
);
},
精彩评论