0% found this document useful (0 votes)
134 views

JQuery Question Bank

The document contains a question bank with multiple choice and short answer questions about jQuery. It tests knowledge of jQuery selectors, methods, syntax and advantages over JavaScript. Some key points covered include jQuery being a JavaScript library, using the $ sign as a shortcut, hiding and styling elements, and event binding.

Uploaded by

premvajale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

JQuery Question Bank

The document contains a question bank with multiple choice and short answer questions about jQuery. It tests knowledge of jQuery selectors, methods, syntax and advantages over JavaScript. Some key points covered include jQuery being a JavaScript library, using the $ sign as a shortcut, hiding and styling elements, and event binding.

Uploaded by

premvajale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JQuery Question Bank

Q.1) Multiple Choice Question

1. JQuery is a
a. JavaScript Method
b. JavaScript Library
c. JSON LIbrary
d. PHP method

2. Which of the following sign is used as shortcut for JQuery


a. The % sign
b. The & sign
c. The $ sign
d. The @ sign

3. Which of the following method is used to hide the selected elements?


a. Hidden()
b. Hide()
c. Visible(false)
d. None()

4. Which JQery method used to set one or more style properties to the selected elements
a. html()
b. style()
c. css()
d. All of above.

5. The correct syntax to set the background color of all h1 elements to yellow in jQuery –

a. $("h1").style("background-color","yellow");
b. $("h1").html("background-color","yellow");
c. $("h1").css("background-color","yellow");
d. $("h1").layout("background-color","yellow");

6. Which of the following jQuery method is used to attach a handler to an event?


a. unbind() method
b. attach() method
c. bind() method
d. None of the above

7. Which of the following jQuery method is used to stop jQuery for few milliseconds?
a. stop() method
b. delay() method
c. slowdown() method
d. pause() method

8. What does the syntax $("p.para") will select?


a. The first paragraph element with class = "para"
b. The first paragraph element with id = "para"
c. The first paragraph element with name = "para"
d. All paragraph elements with class = "para"

9. The jQuery used to find all next sibling elements after the current element is –
a. find() method
b. nextAll() method
c. siblings() method
d. None of the above

10. Which of the following jQuery method is used to check whether or not the selected
elements have the specified class name?
a. hasClass() method
b. addClass() method
c. find() method
d. toggleClass() method

11. The jQuery method used to get all ancestors of the matched set of elements is –
a. parents() method
b. parent() method
c. offsetParent() method
d. None of the above

12. The toggle() method in jQuery is used to –

a. toggle between the hide() and show() methods


b. toggle between the fadeIn() and fadeOut() methods
c. toggle between the slideUp() and slideDown() methods
d. None of the above
13. CDN stands for-
a. Content development network
b. Content delivery network / Content distribution network
c. Communication development network
d. None of the above

14. What does the syntax $("p") will select?


a. All paragraph elements
b. Only first paragraph element
c. Only last paragraph element
d. None of the above

15. Gyh The jQuery selector used to select the elements containing the specified string
is
a. jQuery :contains selector
b. jQuery :lang() selector
c. jQuery :nth-child selector
d. None of the above

Q.2) Short Answer

1) What are the methods used to provide effects?

Some of the effects methods are:

● Show()
● Hide()
● Toggle()
● FadeIn() and
● FadeOut()

2) What is the difference between find and children methods?

Find method is used to find all levels down the DOM tree but children find single
level down the DOM tree.
3) What are the basic selectors in jQuery?

Following are the basic selectors in jQuery:

● Element ID
● CSS Name
● Tag Name
● DOM hierarchy

4) What is the use of each function in jQuery?

Each function is used to iterate each and every element of an object. It is used to
loop DOM elements, arrays and the object properties.

5)What is CDN?

CDN is abbreviated as Content Distribution network and it is said to be a group of


companies in different location with network containing copies of data files to maximize
bandwidth in accessing the data.

6) What are the advantages of jQuery?

Following are the advantages of jQuery:

● Just a JavaScript enhancement


● Coding is simple, clear, reusable
● Removal of writing more complex conditions and loops

7)Which is the fastest selector in jQuery?

ID and Element are the fastest selectors in jQuery.

8)Why jQuery is better than JavaScript?

jQuery is a library used for developing Ajax application and it helps to write the code
clean and concise. It also handles events, animation and Ajax support applications.

You might also like