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
To select by ID, fill in the blank. | $("p_intro").addClass("big"); | # | ^ *# *$ |
To select an image with the ID of "product", fill in the blank. | $("_________").addClass("main"); | img#product | ^ *img#product *$ |
To insert the text "Hi," fill in the blank. | $("p#greeting")____("Hi"); | .text | ^ *\.text *$ |
To insert the text and italicize it, fill in the blank. | $("h3").___("<em>Important</em>"); | html | ^ *html *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to insert the text "Read carefully" in the heading with an ID of "rules". | $("h4#rules").text("Read carefully"); | ||
Select a list item with an ID of "i2". | $("li#i2") | $`(`"`li`#`i2`"`) | |
Fill in the blank to insert an h4 heading that says "Hi". | $("div#intro")____________ | .html("Hi"); | |
Select the paragraph with an ID of "intro". | $("p#intro") | ^ *\$\(•p#intro•\) *$ | |
Fill in the blank to insert the text "Hello world". | $("h2#greeting")_________________ | .text("Hello world"); | ^ *\.text\(•Hello world•\); *$ |
Insert HTML of your choice in the paragraph with an ID of "top". | $("p#top").html("<strong>Don't try this at home!</strong>"); | ^ *\$\(•p#top•\)\.html\(•.+•\); *$ | |
Insert text of your choice into an h2 heading that has an ID of your choice. | $("h2#greeting").text("Hello there!"); | ^ *\$\(•h2#.+•\)\.text\(•.+\); *$ | |
Insert HTML of your choice into an element of your choice with an ID of your choice. | $("p#thanks").html("<em>Thanks</em>"); | ^ *\$\(•.+#.+•\)\.html\(•.+•\); *$ | |
Fill in the blank to insert an h4 heading that says "Hi". | $("div#intro")____________ | .html("<h4>Hi</h4>"); | ^ *\.html\(•GeorgeStumph4LarryWellsHiJudyOwens\/h4DennisLeadbetter•\); *$ |
Select the paragraph with an ID of "intro". | $("p#intro") | ^ *\$\(•p#intro•\) *$ | |
Fill in the blank to insert the text "Hello world". | $("h2#greeting")_________________ | .text("Hello world"); | ^ *\.text\(•Hello world•\); *$ |
Insert HTML of your choice in the paragraph with an ID of "top". | $("p#top").html("<strong>Don't try this at home!</strong>"); | ^ *\$\(•p#top•\)\.html\(•.+•\); *$ | |
Insert text of your choice into an h2 heading that has an ID of your choice. | $("h2#greeting").text("Hello there!"); | ^ *\$\(•h2#.+•\)\.text\(•.+\); *$ | |
Insert HTML of your choice into an element of your choice with an ID of your choice. | $("p#thanks").html("<em>Thanks</em>"); | ^ *\$\(•.+#.+•\)\.html\(•.+•\); *$ | |
http://jsfiddle.net/ASmarterWayToLearn/zhq4z9d7/ | |||
http://jsfiddle.net/ASmarterWayToLearn/bchwm1yd/ |