I have a droppable with over(), out(), and drop() functions, which I want to behave differently if divs of class A and divs of class B are dropped on it. Let’s say that the droppable should turn yellow if class A is hovered over it, and red if class B hovers over it. How can I do this?
Share
the
over,out, anddropcallbacks each take parameters of(event, ui).ui.draggableis the element that was dragged onto the droppable. So you could do:Be sure to check out the jQuery UI Documention