Reputation: 33
I know i can set the class for a dropable object when a valid dragable is hovering, using hoverClass. Is it posible to do that, but for the draggable object (just when it is hovering over a valid target)?
Upvotes: 0
Views: 26
Reputation: 33
ok, i managed to do it using events in the dropable:
el.dropable({
accept: ".target",
over: function(e, ui){
ui.draggable.addClass("valid");
},
out: function(e, ui){
ui.draggable.removeClass("valid");
},
hoverClass: "valid"
});
Upvotes: 1