Select <a> which is the second <a> on a page that contains the same href text? jQuery -


I am working with a page that contains several links that contain the same href text, Anchor must be selected on the page on which the element is said that the href text here is a simplified version of the link structure of the page:

   

How can I fashion my selector so that she only select 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!

as Patrick Carcher mentioned That is, you are missing a slash.

In addition, you should not have a location before : eq (1) .

$ ('a [href = same / link / content]]: eq (1)');

An empty space in the selectors means that after the space, the object is descended from the first item of space.

The way you did it, you were trying to pick it up; Second lineage of a [href = same / link / to / stuff /] .


Comments