troubleshooting Question

Attaching a click event to buttons (with one lying in front of the other) in HTML5 and such that both fire when the button in front is clicked

Avatar of FaheemAhmadGul
FaheemAhmadGulFlag for United Kingdom of Great Britain and Northern Ireland asked on
CSS* HTML 5jQuery
1 Comment1 Solution114 ViewsLast Modified:
I had this question after viewing Using HTML5 and CSS How to place one element in front of another elemen.

This Question is related to a question I previously asked on this forum and which was answered very kindly by Julian Hansen (please see my previous question for details).
I would now like to attach a click event to both these buttons, such that when I click the button in front, the click event of both buttons should fire one after the other. So assuming we display an alert in response to clicking the button which is in front which says ("Button in front clicked") and the button behind click displays an alert ("button behind clicked"), in response to clicking the button in front (green button), I would like to first see and alert saying "button in front clicked", and then when we dismiss this alert the next alert saying "button behind clicked".
Justin Pilditch
Full Stack Developer

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 1 Comment.
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 1 Comment.
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