HTML..
<div class="row">
<div>
<b>Title A</b> <a href="#">Link 1</a> <a href="#">Link 2</a>
</div>
Content A
</div>
<div class="row">
<div>
<b>Title B</b> <a href="#">Link 1</a> <a href="#">Link 2</a>
</div>
Content B
</div>
<div class="row">
<div>
<b>Title C</b> <a href="#">Link 1</a> <a href="#">Link 2</a>
</div>
Content C
</div>
jQuery..
So far my JS adds a "Link 3" link after each "Link 2"..
$("a:contains('Link 2')").each(function(){
$(this).after(' <a href="#">Link 3</a>');
});
For each item in the loop how would I access the title.
$("a:contains('Link 2')").each(function(){
// I need to find the title string for each row. So is there a way to find elements before the $(this) identifier?
$(this).after(' <a href="#">Link 3</a>');
});