I have to following structure:
<div class='xx'>
That is awesome!!
<a href="http://www.his-stuff.com">yodel</a>
</div>
<div class='xx'>
can't touch this
</div>
Now I want to replace all occurrances of "is", no matter if they are standing alone or not. I made it that way:
$('.xx').each(function()
{
$(this).html($(this).html().replace("is","was"));
});
I want the following results:
That is awesome -> That was awesome
Can't touch this -> Can't touch thwas
This works, but the url containing "is" is also modified
www.hwas-stuff.com
I do not want the url to be replaced but all others
Info: I cannot use text() instead of html() because the "real" code is a bit more complex (Inserts images instead of text)