I have somewhere on website a specific text, let\'s say \"lollypops\", and I want to replace all the occurrences of this string with \"marshmellows\". The problem is that I
You could do something like this:
HTML
Hi, I am Murtaza
jQuery
$(".element span").text(function(index, text) { return text.replace('am', 'am not'); });