jQuery Quiz Results #1. Which of the following is correct? jQuery is a JavaScript Library jQuery is a JSON Library #2. jQuery uses CSS selectors to select elements? True False #3. Which sign does jQuery use as a shortcut for jQuery? the $ sign the ? Sign the % sign #4. Look at the following selector: $(“div”). What does it select? All div elements The first div element #5. Is jQuery a library for client scripting or server scripting? Server scripting Client scripting #6. Is it possible to use jQuery together with AJAX? No Yes #7. The jQuery html() method works for both HTML and XML documents True False #8. What is the correct jQuery code to set the background color of all p elements to red? $("p").css("background-color","red"); $("p").layout("background-color","red"); $("p").manipulate("background-color","red"); $("p").style("background-color","red"); #9. With jQuery, look at the following selector: $(“div.intro”). What does it select? The first div element with class="intro" The first div element with id="intro" All div elements with id="intro" All div elements with class="intro" #10. Which jQuery method is used to hide selected elements? display(none) visible(false) hide() hidden() #11. Which jQuery method is used to set one or more style properties for selected elements? html() style() css() #12. Which jQuery method is used to perform an asynchronous HTTP request? jQuery.ajaxSetup() jQuery.ajax() jQuery.ajaxAsync() #13. What is the correct jQuery code for making all div elements 100 pixels high? $("div").height(100) $("div").height="100" $("div").yPos(100) #14. Which statement is true? To use jQuery, you do not have to do anything. Most browsers (Internet Explorer, Chrome, Firefox and Opera) have the jQuery library built in the browser To use jQuery, you must buy the jQuery library at www.jquery.com To use jQuery, you can refer to a hosted jQuery library at Google #15. What scripting language is jQuery written in? C# C++ VBScript JavaScript #16. Which jQuery function is used to prevent code from running, before the document is finished loading? $(body).onload() $(document).load() $(document).ready() #17. Which jQuery method should be used to deal with name conflicts? nameConflict() noConflict() noNameConflict() conflict() #18. Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements? switchClass() toggleClass() switch() altClass() #19. Look at the following selector: $(“div p”). What does it select? All div elements with a p element The first p element inside a div element All p elements inside a div element #20. Is jQuery a W3C standard? No Yes #21. Look at the following selector: $(“p#intro”). What does it select? All p elements with class="intro" The p element with id="intro" #22. Which jQuery method is used to remove selected elements? remove() detach() Both methods can be used #23. Look at the following selector: $(“:disabled”). What does it select? All elements that does not contain the text "disabled" All hidden elements All elements containing the text "disabled" All disabled input elements #24. Which jQuery method returns the direct parent element of the selected element? parents() ancestors() ancestor() parent() #25. The jQuery animate() method can be used to animate ANY CSS property? Only properties containing numeric values Yes All properties except the shorthand properties Previous Finish