
- jQuery Tutorial
- jQuery - Home
- jQuery - Overview
- jQuery - Basics
- jQuery - Syntax
- jQuery - Selectors
- jQuery - Events
- jQuery - Attributes
- jQuery - AJAX
- jQuery DOM Manipulation
- jQuery - DOM
- jQuery - Add Elements
- jQuery - Remove Elements
- jQuery - Replace Elements
- jQuery CSS Manipulation
- jQuery - CSS Classes
- jQuery - Dimensions
- jQuery - CSS Properties
- jQuery Traversing
- jQuery - Traversing
- jQuery - Traversing Ancestors
- jQuery - Traversing Descendants
- jQuery References
- jQuery - Utilities
- jQuery Plugins
- jQuery - Plugins
- jQuery - PagePiling.js
- jQuery - Flickerplate.js
- jQuery - Multiscroll.js
- jQuery - Slidebar.js
- jQuery - Rowgrid.js
- jQuery - Alertify.js
- jQuery - Progressbar.js
- jQuery - Slideshow.js
- jQuery - Drawsvg.js
- jQuery - Tagsort.js
- jQuery - LogosDistort.js
- jQuery - Filer.js
- jQuery - Whatsnearby.js
- jQuery - Checkout.js
- jQuery - Blockrain.js
- jQuery - Producttour.js
- jQuery - Megadropdown.js
- jQuery - Weather.js
- jQuery Useful Resources
- jQuery - Questions and Answers
- jQuery - Quick Guide
- jQuery - Useful Resources
- jQuery - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
jQuery - Mock Test
This section presents you various set of Mock Tests related to jQuery Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

jQuery Mock Test II
Q 1 - Which of the following is correct about jQuery selector?
B - jQuery selectors are used to select one or more HTML elements using jQuery.
C - jQuery selectors start with the dollar sign and parentheses - $()
Answer : D
Explaination
All of the above options are correct.
Q 2 - Which of the following jQuery selector selects elements with the given element tag-name?
Answer : A
Explaination
$('tag-name') selects all element of type tag-name in the document. For example, $('p') selects all paragraphs <p> in the document.
Q 3 - Which of the following jQuery selector selects element with the given element id some-id?
Answer : B
Explaination
$('#some-id') selects the single element in the document that has an ID of some-id.
Q 4 - Which of the following jQuery selector select elements whose css class is some-class?
Answer : C
Explaination
$('.some-class') selects all elements in the document that have a class of some-class.
Q 5 - Which of the following jQuery selector selects all elements available in a DOM?
Answer : A
Explaination
$('*') selects all elements available in a DOM.
Q 6 - Which of the following jQuery method gets attributes of an element?
Answer : A
Explaination
The attr() method can be used to fetch the value of an attribute from the first element in the matched set.
Q 7 - Which of the following jQuery method sets attributes of an element?
Answer : A
Explaination
The attr(name, value) method can be used to set the named attribute onto all elements in the wrapped set using the passed value.
Q 8 - Which of the following jQuery method apply a style on an element?
Answer : B
Explaination
The addClass( classes ) method can be used to apply defined style sheets onto all the matched elements. You can specify multiple classes separated by space.
Q 9 - Which of the following jQuery method removes an attribute from each of the matched elements?
Answer : B
Explaination
The removeAttr( name ) method can be used to remove an attribute from each of the matched elements.
Q 10 - Which of the following jQuery method returns true if the specified class is present on at least one of the set of matched elements?
Answer : C
Explaination
The hasClass( class ) method returns true if the specified class is present on at least one of the set of matched elements.
Q 11 - Which of the following jQuery method remove all or the specified class(es) from the set of matched elements?
Answer : A
Explaination
The removeClass(class) method remove all or the specified class(es) from the set of matched elements.
Q 12 - Which of the following jQuery method adds the specified class if it is not present, remove the specified class if it is present?
Answer : B
Explaination
The toggleClass(class) method adds the specified class if it is not present, removes the specified class if it is present.
Q 13 - Which of the following jQuery method gets the html contents (innerHTML) of the first matched element?
Answer : A
Explaination
The html() method gets the html contents (innerHTML) of the first matched element.
Q 14 - Which of the following jQuery method sets the html contents of an element?
Answer : A
Explaination
The html( val ) method sets the html contents of every matched element.
Q 15 - Which of the following jQuery method get the text contents of an element?
Answer : A
Explaination
The text( ) method gets the combined text contents of all matched elements.
Q 16 - Which of the following jQuery method sets the text of an element?
Answer : A
Explaination
The text( val ) sets the text contents of all matched elements.
Q 17 - Which of the following jQuery method get the input value of an element?
Answer : B
Explaination
The val( ) method gets the input value of the first matched element.
Q 18 - Which of the following jQuery method set the value of an element?
Answer : B
Explaination
The val(val) method sets the value attribute of every matched element if it is called on <input> but if it is called on <select> with the passed <option> value then passed option would be selected, if it is called on check box or radio box then all the matching check box and radiobox would be checked.
Q 19 - Which of the following jQuery method filter out elements from a set of matched elements?
Answer : A
Explaination
The filter( selector ) method can be used to filter out all elements from the set of matched elements that do not match the specified selector(s). The selector can be written using any selector syntax.
Q 20 - Which of the following jQuery method reduce the set of matched elements to a single element?
Answer : B
Explaination
The eq( index ) method reduces the set of matched elements to a single element.
Q 21 - Which of the following jQuery method checks the current selection against an expression?
Answer : B
Explaination
The is( selector ) method checks the current selection against an expression and returns true, if at least one element of the selection fits the given selector.
Q 22 - Which of the following jQuery method removes elements matching the specified selector from the set of matched elements?
Answer : C
Explaination
The not(selector) method removes elements matching the specified selector from the set of matched elements.
Q 23 - Which of the following jQuery method selects a subset of the matched elements?
Answer : C
Explaination
The slice(selector) method selects a subset of the matched elements.
Q 24 - Which of the following jQuery method adds more elements, matched by the given selector, to the set of matched elements?
Answer : A
Explaination
The add( selector ) method adds more elements, matched by the given selector, to the set of matched elements.
Q 25 - Which of the following jQuery method adds the previous selection to the current selection?
Answer : B
Explaination
The andSelf( ) method adds the previous selection to the current selection.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | A |
3 | B |
4 | C |
5 | A |
6 | A |
7 | A |
8 | B |
9 | B |
10 | C |
11 | A |
12 | B |
13 | A |
14 | A |
15 | A |
16 | A |
17 | B |
18 | B |
19 | A |
20 | B |
21 | B |
22 | C |
23 | C |
24 | A |
25 | B |