I am wanting to replace 1 word with another with JavaScript, the code i have is working as below:
$('#test').contents().filter(function() {
return this.nodeType == 3
}).each(function(){
this.textContent = this.textContent.replace('microsoft', 'Hi I am
replace'),('bob', 'bobart')
});
The code works for the first instance and will replace Microsoft but will not change Bob, how can I add multiple words to be replaced into this?
Thank you
,('bob'...should be.replace('bob'...