Practice manipulating the DOM!
In a separate JS file:
When the page loads:
Change the greeting from "Hello, There!" to "Hello, World!".
Set the background color of each
<li>toyellow.Create an image tag, set its
srcattribute tohttp://49.media.tumblr.com/tumblr_m6qt1rjPSz1rxjzkho1_500.gif, and append the to the#greetingdiv.Create and add a ul element to the end of the body with a class of "todo-items"
Go through the array
['make coffee','eat donut','change diapers','drive to work']and create an li element for each item e.g.<li>make coffee</li>Add each newly created li element to your ul of class "todo-items"
Afterwards:
Add the class of
selectedto an<li>when it is clicked. Remove it from any otherlis as well.Change the image to be the most recently clicked food item.
When the gray div is moused over, it's removed from the DOM.
When the orange div is moused over, its width doubles. When the mouse moves out of the div, it returns to its original size.
When the reset button is clicked - remove the
selectedclass from each<li>and change the image topanic.jpeg.When the 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0 key is pressed, the page alerts the message "I HATE NUMBERZZZ!"
BONUS: If someone types the Konami Code, the page alerts "YOU ARE AN EVENT HANDLER GURUUUUUUUUU!"