I have problem: I need to replace some word on page with needed html. For example:
t = $('body').html();
t = t.replace(/Myword/g, '<div></div>');
$('body').html(t);
It is working successfully. But... If body contains javascript tag - JS running again.
If I use document.body - it working
t = document.body.innerHTML;
t = t.replace(/Myword/g, '<div></div>');
document.body.innerHTML = t;
But I am interested in jQuery solution. Maybe you have it?
Thanks in advance