Selecting a link with jQuery

Posted by user201140 on Stack Overflow See other posts from Stack Overflow or by user201140
Published on 2010-06-02T18:07:15Z Indexed on 2010/06/02 18:14 UTC
Read the original article Hit count: 124

Filed under:
|

I want to be able to search for a substring inside the href's in the below code and select the link AFTER the selected string. So, for example the string "page=2" would access the third link.

Thanks in advance.

<div id="container">
<a href='test.php?page=1&title=a title'><a title</a>
<a href='test.php?page=2&title=another title'><another title</a>
<a href='test.php?page=3&title=a last title'><a last title</a>
</div>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about dom