Are there any text selector in jquery ?
My Code
Hello World! Hello World!
Reslut Should be (Using Jque
$('anything').html(function(i, v) { return v.replace(/(World)/g, '$1'); });
The above snippet uses functionality added in jQuery 1.4.
Note: this solution is safe for elements containing only raw text (and no child elements).