onmouseover only fires on top layer

W

wizard04frms

I'm trying to drag one layer over an image on the layer below it - that
part works fine - and have the image fire its onmouseover event (e.g.,
an alert) when I drag the top layer over it. It appears that events
only fire for the top layer, so I never get that alert. Is there a way
to make the onmouseover event happen no matter what the element's
z-index is?
 
B

Bart Van der Donck

I'm trying to drag one layer over an image on the layer below it - that
part works fine - and have the image fire its onmouseover event (e.g.,
an alert) when I drag the top layer over it. It appears that events
only fire for the top layer, so I never get that alert. Is there a way
to make the onmouseover event happen no matter what the element's
z-index is?

I don't believe this is possible. But you could create a transparent
GIF with the highest z-index above your current top layer, and then add
the event to that image. Alternatively, you could set an identical
onmouseover-event for both images (that is, if the one fully overlaps
the second).

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top