I added several exercises to the jQuery lesson from Class 3.
Go back through the slideshow and try to do as many as you can. I would recommend going through the slideshow on your own and doing the exercises as they come up.
The exercises are all titled “EXERCISE”, and are scattered throughout the slideshow. Some of them are just concept questions, not coding. Explanations follow most of the concept questions.
If you do just want to skip to the actual links, the exercises are listed below:
If you’re feeling super ambitious, try to finish off the last 2 slides titled “LET’S DEVELOP IT”. We started one of them in class. The last one is quite challenging, but with the concepts we learned, it is do-able!
Good luck! As always, you can email me with questions at christina.lin.yang (at) gmail (dot) com
You could start off with these if you’d like a hard copy instead of the web tutorials.
Find what works best for you.
If you’re more of a visual person, definitely try out the Code Academy walk throughs. Going through those is like having a one-on-one lesson with a teacher, but you guide yourself through instead.
Put it all together
The three functions we worked on are:
Try to finish implementing the first function. Don’t worry about the “favorite things” or “Friends” functions if you run out of time
An example of how the page would function is below:
Open the page. Three links will be present
Click the first link… something like this appears:
Click the second link… something like this appears
Click the third link… something like this appears
The average weight of a penny is 2.5 grams. The average weight of a quarter is 5.67 grams.
Write an HTML file that contains two links that look like this:
When the first link is clicked, pop up an alert box saying how much 50 pennies would weigh
When the second link is clicked, pop up an alert box saying how much 50 quarters would weigh
Make sure that your links stay on the page after they are clicked. (Hint: if you have any document.write() lines in there, you might want to take them out)
If you have any questions, send me a message here:
christina.lin.yang ( at ) gmail.com
We will go over the answer during our second class.
*** Note, if you use buttons to trigger the alert boxes, that is fine too!