Select <a> which is the second <a> on a page that contains the same href text? jQuery
- by Alex
Hello there,
I'm working with a page that has several links that contain the same href text, and I need to select the second anchor element on the page that contains said href text. Here's a simplified version of the link structure of the page:
<a href="same/link/to/stuff/">same link</a>
<a href="same/link/to/stuff/">same link</a>
How do I fashion my selector so that it only selects the second anchor in the above example?
Currently I'm trying:
$('a[href=same/link/to/stuff/] :eq(1)')
but it is not working.
Thanks!!