Hi,
I want to search a keyword into body and replace it with a link if it is already not linked to somewhere. My code is :
var search = $('body').html();
search = search.replace(/jQuery/g, function($1){
return('<a href="http://jquery.com">' + $1 + '</a>');
});
$('body').html(search);
The problem is, it replaces all keyword even if it is already linked.
I dont want to replace if it is already linked.
can anyone suggest me, what to do....