/highlight

Primary LanguageJavaScript

highlight

What this code does are as follow: When click the button, the text inside the box will be responsive to mouse hovering.

How is this functionality implemented:

  1. Break up the text into words and wrap them in HTML SPAN
  2. When mouse hovers over a word is background color will be changed to yellow.
  3. When mouse leaves the word, its background color will be changed back to white.

What’s been used to make the above functionalities: The DOM, browser Events and FORM handling