• jQuery Video Tutorials

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 calls a function for each element in the array?

A - while()

B - loop()

C - forEach()

D - None of the above.

Answer : C

Explaination

forEach() method calls a function for each element in the array.

Q 3 - Which of the following jQuery selector selects all elements available in a DOM?

A - $('*')

B - $('?')

C - $('#')

D - None of the above.

Answer : A

Explaination

$('*') selects all elements available in a DOM.

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 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 gets a set of elements containing the closest parent element that matches the specified selector, the starting element included?

A - getNearest( selector )

B - getClosest( [selector])

C - closest(selector)

D - None of the above.

Answer : C

Explaination

The closest( selector ) method gets a set of elements containing the closest parent element that matches the specified selector, the starting element included.

Q 7 - Which of the following jQuery method gets a set of elements containing all of the unique siblings of each of the matched set of elements?

A - parents( selector )

B - prevAll( selector)

C - siblings( selector )

D - None of the above.

Answer : C

Explaination

The siblings( [selector] ) method gets a set of elements containing all of the unique siblings of each of the matched set of elements.

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 binds a function to be executed whenever the DOM is ready to be traversed and manipulated?

A - ready(fn)

B - load(fn)

C - reload(fn)

D - None of the above.

Answer : A

Explaination

The ready(fn) function binds a function to be executed whenever the DOM is ready to be traversed and manipulated.

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