jquery draggable accept: classpath
- by heldopslippers
Hi guys.. I have problems with the following bit of javascript/jquery code:
this.droppable = function(){
$('.imageWindow .body .item').draggable();
$('.groupWindow .body .item').droppable({ accept: $(".imageWindow .body .item"),
over: function(event, ui) {
alert("this is valid!");
},
drop: function(){
alert('dropped');
}
});
}
As you maybe know it is not possible to pass the following in the accept option:
$(".imageWindow .body .item")
But what is possible ? I want to pass a "class path" as an accept option !
It is probably a simple answer but i can't figure it out.
Of course i could do:
accept: ".item"
But because "groupWindow .body .item" is a sortable it would also accept himself!
Thanxs if you can help me!