If you’re only interested in determining which element was most recently clicked on, see the solution in Input two or more button - How to tell which button is pressed? - #29 by chriddyp
If you’re only interested in determining which element was most recently clicked on, see the solution in Input two or more button - How to tell which button is pressed? - #29 by chriddyp