HTML ..jQuery .. ziehen einen String vor aktuellen Element
<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 ..
Bisher meine JS nach jedem "Link 2" ein "Link 3" Link hinzufügt ..
Für jedes Element in der Schleife wie würde ich auf den Titel zugreifen.
$("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>');
});