As of now I am using the JavaScript search method to replace some text in body HTML like below..
Suppose my html is
<body>
<div> I am in body...</div>
</body>
Then I am using the below approach
var body = $(body);
var text = body.html();
text = text.replace('I am in body...','Yes');
body.html(text);
But I could see slow page search in browsers like IE..
Please suggest me to improve this and also please let know if there are any plugins to search and match a string even if it contains any html tags in it.. Like below
<body>
<div><span>I </span> am in body...</div>
</body>
With the current method I cannot match this..
If i use
$('*:contains("some search text string")');
This will match the DIV and BODY as well.. But here I want to search the html text not parent element... Thanks