• jQuery Video Tutorials

jQuery - Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to jQuery Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 2 - Which built-in method reverses the order of the elements of an array?

A - changeOrder(order)

B - reverse()

C - sort(order)

D - None of the above.

Answer : B

Explaination

reverse() method reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first.

Q 3 - Which built-in method sorts the elements of an array?

A - changeOrder(order)

B - order()

C - sort()

D - None of the above.

Answer : C

Explaination

sort() method sorts the elements of an array.

Q 4 - Which of the following jQuery method adds the specified class if it is not present, remove the specified class if it is present?

A - toggleStyleClass( class )

B - toggleClass( class )

C - toggleCSSClass( class )

D - None of the above.

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 5 - Which of the following jQuery method checks the current selection against an expression?

A - getIs( selector )

B - is( selector )

C - checkIs( selector )

D - None of the above.

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 6 - Which of the following jQuery method gets a set of elements containing the unique ancestors of the matched set of elements?

A - offsetParent( selector )

B - offset( selector)

C - parents( selector )

D - None of the above.

Answer : C

Explaination

The parents( [selector] ) method gets a set of elements containing the unique ancestors of the matched set of elements (except for the root element).

Q 7 - Which of the following jQuery method gets the inner height (excluding the border) of an element?

A - getCSSHeight( )

B - innerHeight( )

C - getInnerHeight( )

D - None of the above.

Answer : B

Explaination

The innerHeight( ) method gets the inner height (excludes the border and includes the padding) for the first matched element.

Q 8 - Which of the following jQuery method gets the inner width (excluding the border) of an element?

A - getCSSWidth( )

B - innerWidth( )

C - getInnerWidth( )

D - None of the above.

Answer : B

Explaination

The innerWidth( ) method gets the inner width (excludes the border and includes the padding) for the first matched element.

Q 9 - Which of the following jQuery method checks if event.stopImmediatePropagation() was ever called on this event object?

A - isDefaultPrevented( )

B - isPropagationStopped( )

C - isImmediatePropagationStopped( )

D - None of the above.

Answer : C

Explaination

The isImmediatePropagationStopped() method of Event object returns whether event.stopImmediatePropagation() was ever called on this event object.

Q 10 - Which of the following jQuery method setups global settings for AJAX requests?

A - jQuery.ajax( options )

B - jQuery.ajaxSetup( options )

C - serialize( )

D - serializeArray( )

Answer : B

Explaination

The jQuery.ajaxSetup( options ) method setups global settings for AJAX requests.

jquery_questions_answers.htm
Advertisements