Reputation: 1
I have two boxes and both can be used for drag and drop events. I have to highlight only one box at a time where drop function needs to be happen
Upvotes: 0
Views: 150
Reputation: 57709
Detect when a drag event occurs on the document
. Like:
$(document).on("dragstart", ..);
Then add a class to the box that you want to highlight:
$("#drop_box").addClass("highlight");
Then also remeber to remove the class again on "dragend"
Upvotes: 1