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 make the image disappear. | $("img#house_big").css({opacity: __}); | 0 | ^ *•?0•? *$ |
Fill in the blank to make the image visible | $("img#house_big").css({opacity: ___}); | 1 | ^ *•?1•? *$ |
Fill in the blank to make the image half opaque. | $("img#house_big").css({opacity: ___}); | .5 | ^ *•?\.5•? *$ |
Fill in the blank to make the image invisible. | $("img#house_big").css(_________); | {opacity: 0} | ^ *{•?opacity•?: •?0•?} *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to make the image visible. | $("img#house_big").css({opacity: 1}); | ||
Make all divs invisible by specifying opacity. | $("div").css({opacity: 0}); | $`(`"`div`"`)`.`css`(`{`opacity`: `0`}`)`; | |
Make a div visible by specifying its opacity. Its id is "features". | $("div#features").css({opacity: 1}); | ||
Make all images of a certain class invisible. Make up the class name. | $("img.ghost").css({opacity: 0}); | ^ *\$\(•img\..+•\)\.css\({•?opacity•?: •?0•?}\); *$ | |
Give all h4 and h5 headings 75% opacity. | $("h4, h5").css({opacity: .75}); | ^ *\$\(•h4, h5•\)\.css\({•?opacity•?: •?\.75•?}\); *$ | |
A selector has been assigned to a variable. Hide the element by specifying opacity. Make up the variable name. | elementToHide.css({opacity: 0}); | ^ *.+\.css\({•?opacity•?: •?0•?}\); *$ | |
Make a particular paragraph visible by specifying opacity and specify a font-size of 3 ems for it at the same time. Use the most consise coding. Make up the paragraph's id. | $("p#pop").css({opacity: 1, "font-size": "3em"}); | ^ *\$\(•p#.+•\)\.css\({•?opacity•?: •?1•?, •font-size•: •3em•}\); *$ | |
Make a particular image visible by specifying opacity and give it a fixed position 100 pixels down from the top. Use the most consise coding. Make up the image's id. | $("img#loris").css({opacity: 1, "position": "fixed", "top": "100px"}); | ^ *\$\(•img#.+•\)\.css\({•?opacity•?: •?1•?, •position•: •fixed•, •top•: •100px•}\); *$ | |
Make a div visible by specifying its opacity. Its id is "features". | $("div#features").css({opacity: 1}); | ^ *\$\(•div#features•\)\.css\({•?opacity•?: •?1•?}\); *$ | |
Make a class of paragraphs invisible by specifying their opacity. Make up the class name. | $("p.ghost").css({opacity: 0}); | ^ *\$\(•p\..+•\)\.css\({•?opacity•?: •?0•?}\); *$ | |
Give all h4 and h5 headings 75% opacity. | $("h4, h5").css({opacity: .75}); | ^ *\$\(•h4, h5•\)\.css\({•?opacity•?: •?\.75•?}\); *$ | |
A selector has been assigned to a variable. Hide the element by specifying opacity. Make up the variable name. | elementToHide.css({opacity: 0}); | ^ *.+\.css\({•?opacity•?: •?0•?}\); *$ | |
Make a particular paragraph visible by specifying opacity and specify a font-size of 3 ems for it at the same time. Use the most consise coding. Make up the paragraph's id. | $("p#pop").css({opacity: 1, "font-size": "3em"}); | ^ *\$\(•p#.+•\)\.css\({•?opacity•?: •?1•?, •font-size•: •3em•}\); *$ | |
Make a particular image visible by specifying opacity and give it a fixed position 100 pixels down from the top. Use the most consise coding. Make up the image's id. | $("img#loris").css({opacity: 1, "position": "fixed", "top": "100px"}); | ^ *\$\(•img#.+•\)\.css\({•?opacity•?: •?1•?, •position•: •fixed•, •top•: •100px•}\); *$ | |
http://jsfiddle.net/ASmarterWayToLearn/0kx862q0/ | |||
http://jsfiddle.net/ASmarterWayToLearn/tef3vcrr/ |