I understand that I can use the .click() method on a hyperlink element. But how do I know which element was clicked? First I have to gain reference to the hyperlink's ID.
So lets say I have a page of hyperlinks like this in view source:
<a href="addButton1" href="...someurl"><img src="somebutton"></a>
<a href="addButton2" href="...someurl"><img src="somebutton"></a>
<a href="addButton3" href="...someurl"><img src="somebutton"></a>
<a href="addButton4" href="...someurl"><img src="somebutton"></a>
when a user clicks addButton1, how do I even know it's addButton1 that was clicked in the first place so that I can now apply a .click() event on it?