The next several exercises are timed. If you type slowly or dislike time pressure, feel free to increase the allotted time.
Name and email required. Check any number of boxes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
0
0
0
Fill in the blank to fade in the div, without specifying the speed of the fade. | $("div.slowAppearing")._________ | fadeIn(); | ^ *fadeIn\(\); *$ |
Fill in the blank to fade out the div, without specifying the speed of the fade. | $("div.slowAppearing").___________ | fadeOut(); | ^ *fadeOut\(\); *$ |
Fill in the blank to fade in the div, specifying a slow fade using a word not a number. | $("div.slowAppearing").___________ | fadeIn("slow"); | ^ *fadeIn\(•slow•\); *$ |
Fill in the blank to fade out the div, specifying a speedy fade using a word not a number. | $("div.slowAppearing").___________ | fadeOut("fast"); | ^ *fadeOut\(•fast•\); *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to fade in an image in 5 seconds. The id of the image is "hero." | $("img#hero").fadeIn(5000); | ||
Fade in the div with an ID of "prod". Don't specify the fade speed. | $("div#prod")fadeIn(); | $`(`"`div`#`prod`"`)`.`fadeIn`(`)`; | |
Fade out the paragraph with an ID of "rules". Specify a fast fade using a word not a number. | $("p#rules").fadeOut("fast"); | ||
Fade in a div with the id "main". Specify a slow fade using a word. | $("div#main").fadeIn("slow"); | ^ *\$\(•div#main•\)\.fadeIn\(•slow•\); *$ | |
Fade out an image with an id of your choice. Specify a fast fade using a word. | $("img#loris").fadeOut("fast"); | ^ *\$\(•img#.+•\)\.fadeOut\(•fast•\); *$ | |
Fade out all images. Don't specify speed. | $("img").fadeOut(); | ^ *\$\(•img•\)\.fadeOut\(\); *$ | |
Fade in all divs whose class is "slow". Specify a 7-second fade. | $("div.slow").fadeIn(7000); | ^ *\$\(•div\.slow•\)\.fadeIn\(7000\); *$ | |
Fade in a paragraph. Make up the ID. Specify the speed using a number of your choice. | $("p#faded").fadeIn(7000); | ^ *\$\(•p#.+•\)\.fadeIn\([0-9]+\); *$ | |
Fade out the paragraph with an ID of "rules". Specify a fast fade using a word not a number. | $("p#rules").fadeOut("fast"); | ^ *\$\(•p#rules•\)\.fadeOut\(•fast•\); *$ | |
Fade in a div with the id "main". Specify a slow fade using a word. | $("div#main").fadeIn("slow"); | ^ *\$\(•div#main•\)\.fadeIn\(•slow•\); *$ | |
Fade out an image with an id of your choice. Specify a fast fade using a word. | $("img#loris").fadeOut("fast"); | ^ *\$\(•img#.+•\)\.fadeOut\(•fast•\); *$ | |
Fade out all images. Don't specify speed. | $("img").fadeOut(); | ^ *\$\(•img•\)\.fadeOut\(\); *$ | |
Fade in all divs whose class is "slow". Specify a 7-second fade. | $("div.slow").fadeIn(7000); | ^ *\$\(•div\.slow•\)\.fadeIn\(7000\); *$ | |
Fade in a paragraph. Make up the ID. Specify the speed using a number of your choice. | $("p#faded").fadeIn(7000); | ^ *\$\(•p#.+•\)\.fadeIn\([0-9]+\); *$ | |
http://jsfiddle.net/ASmarterWayToLearn/4mes93j2/ | |||
http://jsfiddle.net/ASmarterWayToLearn/hnsbj5dw/ |