This lesson teaches how to do what I call the "accordion effect". When a link is clicked, information appears and the rest of the page slides down.
Click "Load Favorite Movies" to test it out.
$(function() {
$('#container img').animate({
"opacity" : .5
});
$('#container img').hover(function() {
$(this).stop().animate({ "opacity": 1 });
}, function() {
$(this).stop().animate({ "opacity": .5});
});
});
You can see all the code by viewing the source of this page (Ctrl-U in most browsers).