Link to home
Start Free TrialLog in
Avatar of FaheemAhmadGul
FaheemAhmadGulFlag 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".
Avatar of Justin Pilditch
Justin Pilditch
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial