How to stop dragend's default behavior in drag and drop?

JavascriptWeb DevelopmentFront End Scripts

To stop dragend’s default behavior, you need to detect if the mouse is over the drop target where you want to drop.

This is what you should do only if you are hovering over my list − listContainer.insertBefore(source, myNode);

Use jQuery −

if ($(mylist).parent().find(":hover")) {
   listContainer.insertBefore(source, myNode);
}
raja
Published on 06-Apr-2018 13:52:08
Advertisements