• jQuery Video Tutorials

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 - How can you get the type of arguments passed to a function?

A - using typeof operator

B - using getType function

C - Both of the above.

D - None of the above.

Answer : A

Explaination

Using typeof operator, we can get the type of arguments passed to a function.

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 returns the string representation of the number's value?

A - toValue()

B - toNumber()

C - toString()

D - None of the above.

Answer : C

Explaination

toString() method returns the string representation of the number's value.

Q 4 - Which of the following jQuery method remove all or the specified class(es) from the set of matched elements?

A - removeClass( class )

B - removeStyleClass( class )

C - removeCSSClass( class )

D - None of the above.

Answer : A

Explaination

The removeClass(class) method remove all or the specified class(es) from the set of matched elements.

Q 5 - Which of the following jQuery method sets the text of an element?

A - text( val )

B - setText( val )

C - setContent( val )

D - None of the above.

Answer : A

Explaination

The text( val ) sets the text contents of all matched elements.

Q 6 - Which of the following jQuery method returns a jQuery collection with the positioned parent of the first matched element?

A - offsetParent( selector )

B - offset( selector)

C - parent( selector )

D - None of the above.

Answer : A

Explaination

The offsetParent( ) method returns a jQuery collection with the positioned parent of the first matched element.

Q 7 - Which of the following jQuery method finds all sibling elements in front of the current element?

A - parents( selector )

B - prevAll( selector)

C - siblings( selector )

D - None of the above.

Answer : B

Explaination

The prevAll( [selector] ) method finds all sibling elements in front of the current 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 stops the bubbling of an event to parent elements?

A - preventDefault( )

B - stopImmediatePropagation( )

C - stopPropagation( )

D - None of the above.

Answer : C

Explaination

The stopPropagation() method of Event object stops the bubbling of an event to parent elements, preventing any parent handlers from being notified of the event.

Q 10 - Which of the following jQuery method loads a remote page using an HTTP request?

A - jQuery.ajax( options )

B - jQuery.ajaxSetup( options )

C - serialize( )

D - serializeArray( )

Answer : A

Explaination

The jQuery.ajax( options ) method loads a remote page using an HTTP request.

jquery_questions_answers.htm
Advertisements