Search code examples
jqueryjquery-uidrag-and-dropjquery-draggablejquery-droppable

Using jQuery UI draggable, how can I use a callback function on hover over a droppable object?


I need to append text to a cloned helper object when it's dragged over a droppable object.

Is there a way to trigger a callback on hover over a droppable object?


Solution

  • If I understand correctly, you want something to happen when the draggable is over the droppable?

    If so, just use the over event:

    $('.iamdroppable').droppable({
    
    over: function() {  
    //do something here
    },
    
    });