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 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 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 sets attributes of an element?

A - attr(name, value)

B - setAttr(name, value)

C - setAttributes(name, value)

D - None of the above.

Answer : A

Explaination

The attr(name, value) method can be used to set the named attribute onto all elements in the wrapped set using the passed value.

Q 5 - Which of the following jQuery method removes elements matching the specified selector from the set of matched elements?

A - getNotEquals( selector )

B - isNotEquals( selector )

C - not(selector)

D - None of the above.

Answer : C

Explaination

The not(selector) method removes elements matching the specified selector from the set of 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 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 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.

Answer : A

Explaination

The jQuery.get( url, [data], [callback], [type] ) method loads a remote page using an HTTP GET request.

jquery_questions_answers.htm
Advertisements