javascript - Check what content is equal to, if a certain string then replace with a unicode -


i wondering how title described in js / jquery, preferably regex.

what trying word inside html element, in case inside nav li a, , replace unicode.

specifically looking word 'googleplus' , replacing unicode  .

how 1 js or jquery , regex ?

something this:

$("nav li a").text(function(i,currenttext) {     return currenttext.replace(/googleplus/g, ""); }); 

when pass function .text() method called each element in jquery object (i.e., of anchor elements), receiving parameter current text, return value appropriate replacement.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -