I'm trying to set a name for the first link with a specific class, but I'm not sure how to apply something only to the first?
So, I'm trying to find the first div with class sample and then wrap the text in div.title with
<div class="sample">
<div class="title"><a name="thisone">title</a></div>
<p>blah blah</p>
</div>
<div class="sample">
<div class="title">title</div>
<p>blah blah</p>
</div>
<div class="sample">
<div class="title">title</div>
<p>blah blah</p>
</div>
source
share