highlightElements.js is an extremely simple JavaScript application that was developed as an exercise in writing code using the Module design pattern. It will higlight any element that is moused over so long as it is contained in For a good primer on the design pattern, the following links may be useful:
- jQuery 2.1.3 or better
- Include the higlightElement.js file in the
head
of your HTML document - Pass a configuration to
highlightElement.init()
. The configuration can take two arguments:wrapper
: The element containing children which should be higlighted when moused over. The default isbody
.color
: The color of the highlight. Default is light yellow.
And that's it!