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 animate the scroll. | $("body")________{scrollTop: windowHeight}, 800); | .animate( | ^ *\.animate\( *$ |
Fill in the blank to animate the scroll. | ______________{scrollTop: windowHeight}, 800); | $("body").animate( | ^ *\$\(•body•\)\.animate\( *$ |
Fill in the blank to animate the scroll. | $("body").animate({________ windowHeight}, 800); | scrollTop: | ^ *scrollTop: *$ |
Fill in the blank to animate the scroll. | $("body")_______________ windowHeight}, 800); | .animate({scrollTop: | ^ *\.animate\({scrollTop: *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to animate the scroll | $("body").animate({scrollTop: windowHeight}); | ||
Animate a scroll of 500 pixels. Don't specify a speed. | $("body").animate({scrollTop: 500}); | $`(`"`body`"`)`.`animate`(`{`scrollTop`:`1space500`}`)`; | |
Animate a scroll. Specify the variable this_much for the amount of scroll. Don't specify a speed. | $("body").animate({scrollTop: this_much}); | ||
Fill in the blank to animate the scroll in 1 second. | $("body").animate({scrollTop: windowHeight__________ | }, 1000); | ^ *}, 1000\); *$ |
Animate a scroll of a certain number of pixels (your choice). Don't specify a speed. | $("body").animate({scrollTop: 1500}); | ^ *\$\(•body•\)\.animate\({scrollTop: [0-9]+}\); *$ | |
Animate a scroll, using a variable to specify the scroll amount. Make up the variable name. Don't specify a speed. | $("body").animate({scrollTop: windowHeight}); | ^ *\$\(•body•\)\.animate\({scrollTop: .+}\); *$ | |
Animate a scroll, using a variable to specify the scroll amount. Make up the variable name. Use a word to specify the speed (your choice). | $("body").animate({scrollTop: windowHeight}, "slow"); | ^ *\$\(•body•\)\.animate\({scrollTop: .+}, •(fast|slow)•\); *$ | |
When a button is clicked, animate a scroll, using a variable to specify the scroll amount. Don't specify a speed. Make up the id of the button and the variable name. | $("button#read_more").on("click", function() { $("body").animate({scrollTop: windowHeight}); }); | ^ *\$\(•button#.+•\)\.on\(•click•, function\(\) {\n *\$\(•body•\)\.animate\({scrollTop: .+}\);\n}\); *$ | |
Animate a scroll. Specify the variable this_much for the amount of scroll. Don't specify a speed. | $("body").animate({scrollTop: this_much}); | ^ *\$\(•body•\)\.animate\({scrollTop: this_much}\); *$ | |
Fill in the blank to animate the scroll in 1 second. | }, 1000); | ^ *}, 1000\); *$ | |
Animate a scroll of a certain number of pixels (your choice). Don't specify a speed. | $("body").animate({scrollTop: 1500}); | ^ *\$\(•body•\)\.animate\({scrollTop: [0-9]+}\); *$ | |
Animate a scroll, using a variable to specify the scroll amount. Make up the variable name. Don't specify a speed. | $("body").animate({scrollTop: windowHeight}); | ^ *\$\(•body•\)\.animate\({scrollTop: .+}\); *$ | |
Animate a scroll, using a variable to specify the scroll amount. Make up the variable name. Use a word to specify the speed (your choice). | $("body").animate({scrollTop: windowHeight}, "slow"); | ^ *\$\(•body•\)\.animate\({scrollTop: .+}, •(fast|slow)•\); *$ | |
When a button is clicked, animate a scroll, using a variable to specify the scroll amount. Don't specify a speed. Make up the id of the button and the variable name. | $("button#read_more").on("click", function() { $("body").animate({scrollTop: windowHeight}); }); | ^ *\$\(•button#.+•\)\.on\(•click•, function\(\) {\n *\$\(•body•\)\.animate\({scrollTop: .+}\);\n}\); *$ | |
http://jsfiddle.net/ASmarterWayToLearn/tt653xmh/ | |||
http://jsfiddle.net/ASmarterWayToLearn/eqrzgqeo/ |