jQuery Online Test Questions part 3

13. For coping the element ________ method is used.

a. .copy()
b. .clone()
c. .coping()
d. None of these

Answer: b. .clone()

Explanation: For copying the element .clone() method is used. The clone() method makes a copy of selected elements, including child nodes, text and attributes.


14. Jquery library is ____________ file.

a. .html
b. .XML
c. .js
d. .lib

Answer: c. .js

Explanation: The Jquery library is .js file The jQuery library is a single JavaScript file, and you reference it with the HTML <script> tag.s


15. Which of the following method is used to represent an array or an object in serialize manner?

a. size()
b. length()
c. param()
d. None of these

Answer: c. param()

Explanation: The param() method is used to represent an array or an object in serialize manner. This tag is used to define parameters for plugins embedded with an <object> element.


16. In JQuery, ________ method is used to hide the selected elements.

a. visible(false)
b. hidden()
c. display(none)
d. hide()

Answer: d. hide()

Explanation: In JQuery,  hide() method is used to hide the selected elements. This is similar to the CSS property display:none. Hidden elements will not be displayed at all (no longer affects the layout of the page).


17. Which of the following method is used for alternately expand and collapse a page element?

a. .hover()
b. stopPropagation()
c. .toggle()
d. .trigger()

Answer: c. .toggle()

Explanation: The .toggle() method is used for alternately expand and collapse a page element. The toggle() method toggles between hide() and show() for the selected elements.


18. Using jQuery.holdReady() function, we can hold or release the execution of jQuery’s ready event.

a. True
b. False

Answer: a. True

Explanation: The above statement is true. Using jQuery.holdReady() function, we can hold or release the execution of jQuery’s ready event. This function holds or releases the execution of jQuery's ready event.