If you want the droppable to accept a selection of elements you can do something like this:
$(".droppable").droppable({
accept: function(d) {
if(d.hasClass("foo")||(d.attr("id")=="bar")){
return true;
}
}
});
This droppable will accept elements with the class "foo" or an element with the id "bar"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…