Skip to content Skip to sidebar Skip to footer

How To Get Element Under Mouse Cursor While Dragging Another Element?

I googled and found several answers but they was all about click or mousemove events which are not suitable for my question. Basically I allow users to drag an item from a list and

Solution 1:

Apparently, the droppable has an hover function. http://jqueryui.com/droppable/#visual-feedback

$("#folderlist").droppable({
    hoverClass: "ui-state-hover",
    drop: function (event, ui) {
    }
});

Then add this to your css :

.ui-state-hover
{
    background-color: #1c70cf;
}

Post a Comment for "How To Get Element Under Mouse Cursor While Dragging Another Element?"