|
How do you make onlick fire for ONLY the "top-most" div?
Hey guys,
Let's say I've got 2 divs, A and B, and each div has a separate onclick event. Div "A" is in the background, and div "B" is in the foreground, like this...
_______________________________________
|............................................................|
|........................Div A.............................|
|............................................................|
|..............___________________................|
|..............|............................|...............|
|..............|......... Div B............|...............|
|..............|__________________|...............|
|............................................................|
|............................................................|
|______________________________________|
What I want to do, is when div B is clicked on, it fires ONLY the onclick event for div B. But as it is, whenever I click on Div B, it fires the onclick event for Div B AND Div A.
So... how can I keep the div A onclick event from firing whenever I click on Div B?
|