Featured post
drag and drop - javascript mouseover while dragging -
i'm trying implement drag , drop script , have hit wall 1 problem. when take item , start dragging - item directly below cursor , onmouseover event fired on items below. want other items highlight when drag on them. 1 of solutions not drag @ - way mouse events work, ugly. has ever done , know how overcome problem?
if you're thinking suggesting jquery plugin or - please don't. don't need completed solution, educational.
imo, in order have mouseover
event fired binding mouseover
event parent
element of affected elements, or perhaps document
itself, since events bubbled up, elements can fire mouseover
events.
then further, write hit
method in mouseover
event , actively check position of mouse cursor, see whether it's going under target element's boundary. tradeoff in usability , performance. choose.
my 2cents.
or perhaps, can reverse engineer jquery ui
see how implement drag element. haven't check thou, think there should wiser way.
- Get link
- X
- Other Apps
Comments
Post a Comment