The Goal:
Sometimes you want to alter the text, background, or animation of a particular element based on whether the words in match. For example, if a div has the word “home” change the word home to an icon instead.

Requirements:

  • HTML
  • jQuery
  • Font Awesome (a registered account)

Before

After

CodePen

This example shows the required files, HTML and jQuery markup.

Share This