JQuery, get the first link of each <li>
2 answers
If the link is a direct child of the list, the best solution would be the following:
$('ul.classname > li > a:first-child')
I'm not sure, but I think that in other solutions you will get only one link (i.e. the first link of the first list). EDIT: yep, tested this, and :firstwill always return one element, not one for each matched parent element.
+6