I have HTML code like this :
<div>
<a>Link A1</a>
<a>Link A2</a>
<a>Link A3</a>
</div>
<div>
<a>Link B1</a>
<a>Link B2</a>
<a>Link B3</a>
</div>
When user click link from above HTML, I want to get jquery object of corresponding <a>
element, and then manipulating it's sibling. I can't think of any way other then creating ID for each <a>
element, and passing that ID to onclick event handler. I really don't want to use ID.
Any suggestion? I'm a newbie in jquery