This Week’s Lecture
Assignment
Create a JavaScript image gallery from the Assignment Template (zip)
You can use these images (or your own).
Image links (the unordered links list) should change the src attribute of the image within the div with the id of “main_image” using onclick event (you can use addEventSimple or traditional event binding methods)
Tools you will need:
- Lecture 07: The DOM
- addEventSimple if desired
- DOM Manipulation–using document.getElementById()
Tips
Remember that you must prevent the default action upon clicking the link using “return false”, otherwise, the href will continue as the browser expects, pushing the user off the page.
Extra Credit
Spice up your image gallery with extra CSS styling, unobtrusive JavaScript, thumbnail rollovers, image preloading, add lightbox, etc…
Publish this page on your Assignments Page by next week’s lecture