Created
February 11, 2014 03:30
-
-
Save jpetto/8928835 to your computer and use it in GitHub Desktop.
ASWM - HW 1 - Helper code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function() { | |
'use strict'; | |
// get a reference to the element with the id 'mountain-image' | |
var mountain_image = document.querySelector('#mountain-image'); | |
// get a reference to the element with the id 'mountain' | |
// TODO 1 | |
// add a click event listener to the mountain_image element | |
mountain_image.addEventListener('click', function(e) { | |
// using the classList API, toggle the 'episode-open' class on the mountain element | |
// see the week 2 notes for a demonstration of the classList APIs toggle function | |
// TODO 2 | |
}); | |
// repeat the above for the other two images on the page ('marge-image' and 'plow-image') | |
// TODO 3 | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment