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 returns the character at the specified index?

A - characterAt()

B - getCharAt()

C - charAt()

D - None of the above.

Answer : C

Explaination

charAt() method returns the character at the specified index.

Q 3 - Which of the following jQuery selector select elements whose css class is some-class?

A - $('some-class')

B - $('#some-class')

C - $('.some-class')

D - None of the above.

Answer : C

Explaination

$('.some-class') selects all elements in the document that have a class of some-class.

Q 4 - Which of the following jQuery method removes an attribute from each of the matched elements?

A - deleteAttr( name )

B - removeAttr( name )

C - removeAttribute( name )

D - None of the above.

Answer : B

Explaination

The removeAttr( name ) method can be used to remove an attribute from each of the matched elements.

Q 5 - Which of the following jQuery method filter out elements from a set of matched elements?

A - filter( selector )

B - setFilter( selector )

C - putFilter( selector )

D - None of the above.

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 6 - Which of the following jQuery method reverts the most recent 'destructive' operation, changing the set of matched elements to its previous state?

A - revert( )

B - end( )

C - undo( )

D - None of the above.

Answer : B

Explaination

The end( ) method reverts the most recent 'destructive' operation, changing the set of matched elements to its previous state.

Q 7 - Which of the following jQuery method sets the height property of an element?

A - setCSSHeight( value )

B - setHeight( value)

C - height( value )

D - None of the above.

Answer : C

Explaination

The height( value ) method sets the CSS height of every matched element.

Q 8 - Which of the following jQuery method returns the top and left position of an element relative to its offset parent?

A - offset( )

B - offsetParent( )

C - position( )

D - None of the above.

Answer : C

Explaination

The position( ) method gets the top and left position of an element relative to its offset parent.

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

A - isDefaultPrevented( )

B - isPropagationStopped( )

C - isImmediatePropagationStopped( )

D - None of the above.

Answer : B

Explaination

The isPropagationStopped() method of Event object returns whether event.stopPropagation() 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