jquery , selector, contains one of the text
- by Alexander Corotchi
Hi ,
I need a help for one thing :
this is my jQuery idea:
var text = "Some Text1, Some Text2, Some Text3";
$("h3:contains('"+even one of this string+"')").each(function() {
$(this).append("<span>Some Text</span>");
});
This is My HTML
<h3 class="test1">Some Text2</h3>
<h3 class="test1">Some Text1</h3>
<h3 class="test3">Another Text</h3>
What I want in OUTPUT:
<h3 class="test1">
Some Text2
<span>Some Text</span>
</h3>
<h3 class="test1">
Some Text1
<span>Some Text</span>
</h3>
<h3 class="test3">Another Text</h3>
Thanks!