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 listen for a click. | $("button#b1").__("click" | on | ^ *on *$ |
Fill in the blank to listen for a click. | $("button#b1").on(_____ | "click" | ^ *•click• *$ |
Fill in the blank to listen for a click. | $("button#b1")_________ | .on("click" | ^ *\.on\(•click• *$ |
Fill in the blank to listen for a double click. | $("button#b1")__________ | .on("dblclick" | ^ *\.on\(•dblclick• *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to listen for a click on any list item | $("li").on("click" | ||
Listen for a click on any paragraph. | $("p").on("click" | $`(`"`p`"`)`.`on`(`"`click`" | |
Listen for a click on any div whose class is "clickable". | $("div.clickable").on("click" | ||
Listen for a click on an image. Make up an ID for the image. | $("img#clickable").on("click" | ^ *\$\(•img#.+•\)\.on\(•click• *$ | |
Listen for a double click on a heading--your choice of size. Make up the ID of the heading. | $("h4#clickable").on("dblclick" | ^ *\$\(•h[1-6]#.+•\)\.on\(•dblclick• *$ | |
Listen for the user to click the submit button in a form whose ID is "f2". | $("form#f2").on("submit" | ^ *\$\(•form#f2•\)\.on\(•submit• *$ | |
Listen for the user to click in a form field whose ID is "city". | $("input#city").on("focus" | ^ *\$\(•input#city•\)\.on\(•focus• *$ | |
Listen for the user to click or double click any button. | $("button").on("click dblclick" | ^ *\$\(•button•\)\.on\(•click dblclick• *$ | |
Listen for a click on any div whose class is "clickable". | $("div.clickable").on("click" | ^ *\$\(•div\.clickable•\)\.on\(•click• *$ | |
Listen for a click on an image. Make up an ID for the image. | $("img#clickable").on("click" | ^ *\$\(•img#.+•\)\.on\(•click• *$ | |
Listen for a double click on a heading--your choice of size. Make up the ID of the heading. | $("h4#clickable").on("dblclick" | ^ *\$\(•h[1-6]#.+•\)\.on\(•dblclick• *$ | |
Listen for the user to click the submit button in a form whose ID is "f2". | $("form#f2").on("submit" | ^ *\$\(•form#f2•\)\.on\(•submit• *$ | |
Listen for the user to click in a form field whose ID is "city". | $("input#city").on("focus" | ^ *\$\(•input#city•\)\.on\(•focus• *$ | |
Listen for the user to click or double click any button. | $("button").on("click dblclick" | ^ *\$\(•button•\)\.on\(•click dblclick• *$ | |
http://jsfiddle.net/ASmarterWayToLearn/1c64qhyo/ | |||
http://jsfiddle.net/ASmarterWayToLearn/svhqyyfd/ |