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 combines the text of two strings and returns a new string?

A - append()

B - concat()

C - attach()

D - None of the above.

Answer : B

Explaination

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

Q 3 - Which built-in method returns the characters in a string beginning at the specified location?

A - substr()

B - getSubstring()

C - slice()

D - None of the above.

Answer : A

Explaination

substr() method returns the characters in a string beginning at the specified location through the specified number of characters.

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 adds the previous selection to the current selection?

A - add( selector )

B - andSelf( )

C - append(selector)

D - None of the above.

Answer : B

Explaination

The andSelf( ) method adds the previous selection to the current selection.

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 gets the style property of an element?

A - getClass( name )

B - getStyle( name)

C - css( name )

D - None of the above.

Answer : C

Explaination

The css( name ) method returns a style property on the first matched element.

Q 8 - Which of the following jQuery method removes set of matched elements?

A - empty( )

B - delete( )

C - remove( expr )

D - None of the above.

Answer : C

Explaination

The remove( expr ) method removes all matched elements from the DOM.

Q 9 - Which of the following jQuery method can be used to attach a function to be executed whenever an AJAX request begins and there is none already active?

A - ajaxStart( callback )

B - ajaxComplete( callback )

C - ajaxSend( callback )

D - ajaxStop(callback)

Answer : A

Explaination

The ajaxStart( callback ) method can be used to attach a function to be executed whenever an AJAX request begins and there is none already active.

Q 10 - Which of the following jQuery method can be used to attach a function to be executed when all AJAX requests have ended?

A - ajaxStart( callback )

B - ajaxComplete( callback )

C - ajaxSend( callback )

D - ajaxStop(callback)

Answer : D

Explaination

The ajaxStop( callback ) method can be used to attach a function to be executed when all AJAX requests have ended.

jquery_questions_answers.htm
Advertisements