jQuery GRADE A Q&A
1. Which of the following is correct?
jQuery is a JSON Library
jQuery is a JavaScript Library - (correct answer)B
2. jQuery uses CSS selectors to select elements?
True
False - (correct answer)True
3. Which sign does jQuery use as a shortcut for jQuery?
the $ sign
the % sign
the ? Sign - (correct answer)A
4. With jQuery, look at the following selector: $("div"). What does it select?
The first div element
All div elements - (correct answer)B
5. Is jQuery a library for client scripting or server scripting?
Client scripting
Server scripting - (correct answer)A
, 6. Is it possible to use jQuery together with AJAX?
No
Yes - (correct answer)B
7. The jQuery html() method works for both HTML and XML documents
False
True - (correct answer)False
8. What is the correct jQuery code to set the background color of all p elements to red?
$("p").style("background-color","red");
$("p").manipulate("background-color","red");
$("p").layout("background-color","red");
$("p").css("background-color","red"); - (correct answer)D
9. With jQuery, look at the following selector: $("div.intro"). What does it select?
All div elements with class="intro"
The first div element with id="intro"
The first div element with class="intro"
All div elements with id="intro" - (correct answer)A
10. Which jQuery method is used to hide selected elements?
visible(false)
1. Which of the following is correct?
jQuery is a JSON Library
jQuery is a JavaScript Library - (correct answer)B
2. jQuery uses CSS selectors to select elements?
True
False - (correct answer)True
3. Which sign does jQuery use as a shortcut for jQuery?
the $ sign
the % sign
the ? Sign - (correct answer)A
4. With jQuery, look at the following selector: $("div"). What does it select?
The first div element
All div elements - (correct answer)B
5. Is jQuery a library for client scripting or server scripting?
Client scripting
Server scripting - (correct answer)A
, 6. Is it possible to use jQuery together with AJAX?
No
Yes - (correct answer)B
7. The jQuery html() method works for both HTML and XML documents
False
True - (correct answer)False
8. What is the correct jQuery code to set the background color of all p elements to red?
$("p").style("background-color","red");
$("p").manipulate("background-color","red");
$("p").layout("background-color","red");
$("p").css("background-color","red"); - (correct answer)D
9. With jQuery, look at the following selector: $("div.intro"). What does it select?
All div elements with class="intro"
The first div element with id="intro"
The first div element with class="intro"
All div elements with id="intro" - (correct answer)A
10. Which jQuery method is used to hide selected elements?
visible(false)