Avatar of FaheemAhmadGul
FaheemAhmadGul
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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

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".
CSS* HTML 5jQuery

Avatar of undefined
Last Comment
Justin Pilditch

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Justin Pilditch

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23