Reputation: 3234
I am trying to implement an "drag to sort" function on this page. On the right side there are thumbnails which I want to be able to order. I thought to use jQuery's sortable in jQuery UI
. But it seems to be a bit odd since my thumbnails are scaled through CSS
and then it does not work correctly.
Now I have made something what is basically. When I have a mouse down event on a thumbnail, I clone it hide the original and put the cloned element where my mouse is. But now when I hover (while having the cloned element under my cursor) over another thumbnail the hover event is not fired for that thumbnail.
Is there another way to determine if my cursus is above a certain element in the DOM
? E.g so I can detect that the cursor is above another thumbnail while dragging a thumbnail.
Upvotes: 1
Views: 764
Reputation: 3234
Well, that was fast. This CSS
on the item which is dragged seems to do the trick.
pointer-events: none;
Upvotes: 1