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 removes the last element from an array and returns that element?

A - last()

B - get()

C - pop()

D - None of the above.

Answer : C

Explaination

pop() method removes the last element from an array and returns that element.

Q 3 - Which built-in method returns the calling string value converted to upper case?

A - toUpperCase()

B - toUpper()

C - changeCase(case)

D - None of the above.

Answer : A

Explaination

toUpperCase() method returns the calling string value converted to upper case.

Q 4 - Which of the following jQuery method adds the specified class if it is not present, remove the specified class if it is present?

A - toggleStyleClass( class )

B - toggleClass( class )

C - toggleCSSClass( class )

D - None of the above.

Answer : B

Explaination

The toggleClass(class) method adds the specified class if it is not present, removes the specified class if it is present.

Q 5 - Which of the following jQuery method get the input value of an element?

A - getContent()

B - val( )

C - getValue( )

D - None of the above.

Answer : B

Explaination

The val( ) method gets the input value of the first matched element.

Q 6 - Which of the following jQuery method gets the direct parent of an element?

A - offsetParent( selector )

B - offset( selector)

C - parent( selector )

D - None of the above.

Answer : C

Explaination

The parent( [selector] ) method gets the direct parent of an element. If called on a set of elements, parent returns a set of their unique direct parent elements.

Q 7 - Which of the following jQuery method gets the width property of an element?

A - getCSSWidth( )

B - getWidth( )

C - width( )

D - None of the above.

Answer : C

Explaination

The width( ) method gets the width of every matched element.

Q 8 - Which of the following jQuery method returns the outer height (including the border) of an element?

A - getCSSHeight( )

B - getHeight( )

C - outerHeight( [margin] )

D - None of the above.

Answer : C

Explaination

The outerHeight( [margin] ) method gets the outer height (includes the border and padding by default) for the first matched element.

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.

Answer : B

Explaination

The jQuery.getJSON( url, [data], [callback], [type] ) method loads JSON data using an HTTP GET request.


jquery_questions_answers.htm

Advertisements