Skip to content

Instantly share code, notes, and snippets.

@jonschr
Created November 10, 2015 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschr/dd47658988877ef2020c to your computer and use it in GitHub Desktop.
Save jonschr/dd47658988877ef2020c to your computer and use it in GitHub Desktop.
Adding a copyright symbol every time an instance of a word is used (for use on a site where we needed that copyright added throughout automatically)
jQuery(document).ready(function( $ ) {
$("body *").replaceText( /Hold Me Tight/gi, "Hold Me Tight<span class='trademark'>&reg;</span>" );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment