update answers on jquery exercises

pull/2/head
Michael Q Larson 2014-12-01 17:31:42 -08:00
parent 7eadc3b3f0
commit dc77df06e3
1 changed files with 13 additions and 13 deletions

View File

@ -6,33 +6,33 @@ block content
0: "To get started, open your Chrome DevTools. The #next-exercise button is disabled below. Try using jQuery's .attr() method to turn the disabled attribute to false.", 0: "To get started, open your Chrome DevTools. The #next-exercise button is disabled below. Try using jQuery's .attr() method to turn the disabled attribute to false.",
1: "Move the .target element from #location1 to #location2.", 1: "Move the .target element from #location1 to #location2.",
2: "Change the background color of .target to red.", 2: "Change the background color of .target to red.",
3: "Change the background color of the even-numbered targets to red (all targets are children of #location1).", 3: "Change the background color of the even-numbered targets to red.",
4: "Change the background color of the target4 to red.", 4: "Change the background color of the target4 to red.",
5: "Clone the target2 in #location1 so that it also exists in #location2.", 5: "Clone the target2 in #location1 so that it also exists in #location2.",
6: "Remove the target3 from element from #location1.", 6: "Remove the target3 from element from #location1.",
7: "Check the following checkboxes using jQuery.", 7: "Check the following checkboxes using jQuery.",
8: "Make the text input field read-only.", 8: "Make the text input field read-only.",
9: "Select the target2 option in the select box.", 9: "Select the target2 option in the select box.",
10: "Add the following css classes to .target: 'animated' and 'hinge'", 10: "Add the following css classes to .target: 'animated' and 'hinge'.",
11: "Use jQuery to read the data of .target", 11: "Use jQuery to read the data of .target.",
12: "Use 'length' to count the number of child elements in #location1, then display that value in #location2", 12: "Use 'length' to count the number of child elements in #location1, then display that value in #location2.",
13: "There's an element hidden in #location1. Show it using jQuery, and then click on it" 13: "There's an element hidden in #location1. Show it using jQuery, and then click on it."
}; };
var hint = { var hint = {
0: "$('#next-exercise').attr('disabled', false)", 0: "$('#next-exercise').attr('disabled', false)",
1: "$('#location1').children().appendTo('#location2');", 1: "$('.target').appendTo('#location2');",
2: "$('.target').css('background', 'red');", 2: "$('.target').css('background', 'red');",
3: "$('#location1').children('.target:even').css('background', 'red')", 3: "$('.target:even').css('background', 'red');",
4: "$('#location1').find('div:nth-child(4)').css('background', 'red')", 4: "$('.target:nth-child(4)').css('background', 'red');",
5: "$('#location1').find('div:nth-child(2)').clone().appendTo('#location2')", 5: "$('.target:nth-child(2)').clone().appendTo($('#location2'));",
6: "$('#location1').find('div:nth-child(3)').remove();", 6: "$('.target:nth-child(3)').remove();",
7: "$('#location1 input').attr('checked', 'true')", 7: "$('#location1 input').attr('checked', 'true')",
8: "$('#location1 input').attr('readonly', 'true')", 8: "$('#location1 input').attr('readonly', 'true')",
9: "$('#location1 select').val('target2');", 9: "$('#location1 select').val('target2');",
10: "$('#location1 div').addClass('animated hinge')", 10: "$('.target').addClass('animated hinge');",
11: "$('#location1').children().data()", 11: "$('.target').data();",
12: "$('#location2').text($('#location1').children().length)", 12: "$('#location2').text($('#location1').children().length)",
13: "$('#location1').children().show();" 13: "$('#finished-button').show().click();"
}; };
var elements = { var elements = {
0: "", 0: "",