Document Object Model And Event Handling - Study Mode

[#86] The events that is emulated by the jQuery library are
Correct Answer

(B) focusall and focusnone

Explanation

Solution: The jQuery library emulates focusin and focusout events for browsers that do not support them.

[#87] Which event is triggered sooner when the document and its elements are ready to manipulate?
Correct Answer

(C) Both DOMContentLoaded & readystatechange

Explanation

Solution: DOMContentLoaded and readystatechange are alternatives to the load event: they are triggered sooner, when the document and its elements are ready to manipulate, but before external resources are fully loaded.

[#88] Which of the following are the features of jQuery?
Correct Answer

(D) All of the mentioned

Explanation

Solution: These features are at the heart of jQuery’s power and utility: 1. An expressive syntax (CSS selectors) for referring to elements in the document 2. An efficient query method for finding the set of document elements that match a CSS selector 3. A useful set of methods for manipulating selected elements 4. Powerful functional programming techniques for operating on sets of elements as a group, rather than one at a time 5. A succinct idiom (method chaining) for expressing sequences of operations.

[#89] Which of the following is a single global function defined in the jQuery library?
Correct Answer

(A) jQuery()

Explanation

Solution: The jQuery library defines a single global function named jQuery(). This function is so frequently used that the library also defines the global symbol $ as a shortcut for it.

[#90] Which of the following is a factory function?
Correct Answer

(B) jQuery()

Explanation

Solution: jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword) jQuery objects define many methods for operating on the sets of elements they represent, and most of this chapter is devoted to explaining those methods.