I want to use javascript to detect if an element exists under the cursor of the mouse, meaning that for example I want to check if I was on an “img” or if i was on a “p” element.
I don’t want to add a hover method, the application does dragging and dropping of elements, and while dragging, I want to deny the dropping of that element in an area where another element exists.
Is it possible using javascript/jQuery and html ? and what would be right way to do it ?
You can try it: