troubleshooting Question

Z-index event passing

Avatar of Pawel Witkowski
Pawel WitkowskiFlag for Poland asked on
Web Languages and StandardsJavaScriptHTML
9 Comments1 Solution2450 ViewsLast Modified:
I got a little problem. In mine aplication I would like to have something like that:

<div style="z-index:2;position:absolute;width:100px;height:100px">asdf </div>
<div style="position:absolute;width:100px;height:100px" onclick="alert('test')"> blbdlf blbdflbdfl</div>

(the text will be one on another - that is intended - in mine application there are text over images).

The problem lying in onclick event (and all other events) - using z-index makes all field 100x100 to be handled via first div event handler, but i would like that this div would be transparent for event handler (putting a function to pass event on this second div is not good because i have many divs under the first div). Is there any method that you know to make this first DIV transparent for events?? Thanks for any advices :)
ASKER CERTIFIED SOLUTION
JohnSixkiller

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros