Let’s practice some of the traversing methods.
Download the boilerplate code from the source code link and extract locally. Import into cloud9. Bring up button.html in a browser. Write jQuery code to perform the following (add to script.js):
- When a colored panel is clicked, all panels vanish
- When a colored panel is clicked, just that panel disappears
- When a panel is clicked, all siblings fade to 10% opacity
- When reset is clicked, all panels revert to full opacity
- When the mouse hovers over a panel, that panel turns black
- When the mouse moves away, the panel reverts back to its previous colour