Handling click events on z-index'd layers

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2009-06-22T08:23:35Z Indexed on 2010/04/07 11:33 UTC
Read the original article Hit count: 154

I have 2 z-index layers in a map application I'm building. I have a problem when I click on the layers to zoom in. The click handler is on the underlying z-index layer and I don't want it to fire when a control in the overlying layer is clicked.

The problem i have is that the event gets raised no matter what but the originalTarget property of the event is not the image in the underlying layer when something on the top layer is clicked. Is there anyway to change this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about event-handling