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:
- Break up the text into words and wrap them in HTML SPAN
- When mouse hovers over a word is background color will be changed to yellow.
- 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