Automatically assign a style to any written instance of word on a page


/ Published in: JavaScript
Save to your folder(s)

Not sure what I\'d ever use this for as it doesn\'t exactly lend itself to flexibility in the long term, but saving it anyway.


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. $(document).ready(function() { $("#wrapper").html( $("#wrapper").html().replace(/Stephcode/g, '<span style="font-size: 10em;">Stephcode</span>') ); });
  3. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.