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
Post a Comment