JQuery MCQ(multiple choice question) with answer

In this jquery MCQ section, we will focus on the basic question which was asked in an interview, school or college exam, or during campus interviews.
1. jQuery is a
a) JSON library
b) JavaScript method
c) JavaScript library
d) java library
2. which jquery method is used to hide selected elements?
a) hide() Method
b) display(none) method
c) Visible(True)
d) hidden()
3. jQuery uses ________ syntax to select elements
a) CSS
b) Javascript
c) HTML
d) Java
4. Which sign does jquery use as a shortcut for jquery?
a) & sign
b) % sign
c) @ sign
d) $ sign
5. Which jquery method is used to remove selected elements?
a) detach()
b) remove()
c) throw()
d) none of the above
6. what is the correct jquery code to set the background color of all p elements to red?
a) $("p").display("background-color","red");
b) $("p").css("background-color","red");
c) $("p").layout("background-color","red");
d) $("p").style("background-color","red");
7. which jquery method returns the direct parent element of the selected element?
a) upperdiv() Method
b) parent() Method
c) divparent() Method
d) none of the above
8. with jquery, look at the following selector: $("div.intro"). what does it select?
a) All div elements with class="intro"
b) All div elements with id="intro"
c) The first div element with id="intro"
d) The first div element with class="intro"
9. The jQuery html() method works for both HTML and XML documents
a) True
b) False
c) can't say
d) none of the above
10. which jquery method is used to set one or more style properties for selected elements?
a) css()
b) html()
c) style()
d) both style() and css()
11. which jquery method should be used to deal with name conflicts?
a) The nameConflict() method
b) The noConflict() Method
c) The conflict() method
d) none of the above
12. when was jquery first released?
a) 2006
b) 2007
c) 2005
d) 2003
13. Which jQuery method is used to attach multiple event handlers to an element?
a) attach() method
b) unbind()
c) on()
d) click()
14. Which of the jQuery function prevents the code from running before the loading of the document finishes?
a) $(document).ready()
b) $(document).load()
c) $(document).trim()
d) $(document).unload()
15. What does the syntax $("p") will select?
a) Only first paragraph element
b) All paragraph elements
c) Only last paragraph
d) None of the above
16. Which of the following is a single global function defined in the jQuery library?
a) jQuery()
b) $()
c) Queryanalysis()
d) global()
17. Look at the following selector: $("div"). What does it select?
a) All div element
b) first div element
c) last div element
d) none of the above
18. Which code will hide the current element?
a) $("p").hide()
b) $(this).hide()
c) $(this).hide('true');
d) $(this).hide(0);
19. jQuery is a ___________.
a) lightweight
b) heavyweight
c) Both A and B
d) none of the above
20. $(this) in jQuery is used when
a) an HTML element references the action of its parent
b) an HTML element references the entire document
c) an HTML element references its own action
d) none of the above
adsection