jQuery - Online Quiz


Advertisements


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 1 - Which of the following is a valid type of function javascript supports?

A - named function

B - anonymous function

C - Both of the above.

D - None of the above.

Answer : C

Explaination

A function in JavaScript can be either named or anonymous.

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 gets the html contents (innerHTML) of the first matched element?

A - html( )

B - getHtml( )

C - getInnerHtml( )

D - None of the above.

Answer : A

Explaination

The html() method gets the html contents (innerHTML) of the first matched element.

Q 5 - Which of the following jQuery method reduce the set of matched elements to a single element?

A - isEqual( index )

B - eq( index )

C - checkEqual( selector )

D - None of the above.

Answer : B

Explaination

The eq( index ) method reduces the set of matched elements to a single element.

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 all child nodes from the set of matched elements?

A - empty( )

B - delete( )

C - remove( expr )

D - None of the above.

Answer : A

Explaination

The empty( ) method removes all child nodes from the set of matched elements.

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 can be used to attach a function to be executed whenever an AJAX request is sent?

A - ajaxStart( callback )

B - ajaxComplete( callback )

C - ajaxSend( callback )

D - ajaxError(callback)

Answer : C

Explaination

The ajaxSend( callback ) method can be used to attach a function to be executed whenever an AJAX request is sent.


jquery_questions_answers.htm

Advertisements