Wrapping elements and class



just curious if this is considered a type of wrap from text to highlighted? Kind of a bottom up wrap?



Not sure I get the question. The code looks fine.

The target element is a DIV which initially has no highlighting. If we examine the style sheet we will find the selector rule for, '.highlighted'. It will look something like,

.highlighted {
    box-shadow: 0 0 8px #FFD700;

When we click on target, the handler is triggered that adds the class to the #text element. The browser redraws the page with the new highlight effect on that element.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.