An example I used when teaching jquery basics and object-oriented JavaScript.
Visit the final step here.
If you want to use it as an exercise :
- visit every level page to observe what's going on.
- go and watch level 1 page
- don't look at the html / css code, and try to code something similar by yourself.
- when it's done, or if you are stuck, you can look at source files
- don't go to level 2 until you understand every line in level 1 files
- do the same for the following levels