[Solved] Use jQuery to find and replace multiple words on the page [duplicate]

[ad_1]

You may try something like this:

var dictionary= {
"My Classes":"My Levels",
"My Class":"My Level",
"college":"university"
};

$("body *").each( function(){
    for( var ptrn in dictionary){
        $(this).text( $(this).text().replace(new RegExp(ptrn ,"g"), dictionary[ptrn] ) );
    }
});

[ad_2]

solved Use jQuery to find and replace multiple words on the page [duplicate]