jQuery Advanced QuizS2C Home « jQuery Advanced Quiz

The questions in this third quiz on jQuery are on the topics covered in the jQuery Advanced section of the site. The table below lists the lessons, a description of the lesson content and the the quiz question number range.

Lesson Summary

Click on a lesson in the table to go to that lesson for a refresher on the topics for that lesson.

jQuery Advanced Lessons Description Question Range
Lesson 1 - Browser & Loading EventsIn this lesson we venture into the dynamic world of event handlers by looking at loading and browser event methods.1 - 3
Lesson 2 - Keyboard & Mouse EventsIn this second lesson on event handlers we look at the keyboard and mouse event methods available with jQuery.4 - 6
Lesson 3 - Form EventsIn our final investigation of event handlers we look at the form event methods available with jQuery.7 - 9
Lesson 4 - Event Handler AttachmentsFollowing on from our three lessons covering all the JavaScript event handler methods in jQuery, we delve into the event handler attachments available for use with these events.10 - 12
Lesson 5 - The Event ObjectIn this lesson we investigate the jQuery Event object and how to utilize it for use in our webpages.13 - 15
Lesson 6 - The Callbacks ObjectIn this lesson we investigate the jQuery Callbacks object and how to utilize it for use in our webpages.16 - 18
Lesson 7 - The Deferred ObjectIn this lesson we investigate the jQuery Deferred object and how to utilize it for use in our webpages.19 - 21
Lesson 8 - Ajax Low-Level InterfaceIn this lesson we investigate the methods that make up the jQuery Ajax Low-Level Interface.22 - 24
Lesson 9 - Ajax Shorthand MethodsIn this lesson we investigate the methods that make up the jQuery Ajax Shorthand Methods.25 - 27
Lesson 10 - Ajax Helper FunctionsIn this lesson we investigate the methods that make up the jQuery Ajax Helper Functions suite.28 - 30
Lesson 11 - Ajax Global Event HandlersIn our final lesson on Ajax we explore the methods that make up the jQuery Ajax Global Event Handlers.31 - 33

jQuery Quiz

The quiz below tests your knowledge of the material learnt in the jQuery Advanced section of the site.

Question 1 : What is the only document loading method that has not been deprecated?
- The <code>.ready()</code> document loading method has not been deprecated. The <code>.resize()</code> and <code>.scroll()</code> methods are not deprecated but are browser methods.
Question 2 : What is the following code example a shorthand version of?
$(function(){});
- This code is a shorthand version of the <code>.ready()</code> function.
Question 3 : What is a major advantage of using the .ready() function instead of window.onload?
- The <code>.ready()</code> document loading method is fired after the document is fully parsed and converted into the DOM tree and can be used multiple times within the same HTML document.
Question 4 : How many event handlers are bound to the .dblclick() method?
- There is 1 event handler bound to the <code>.dblclick()</code> method.
Question 5 : Which jQuery event method was removed in 1.9?
-The <code>.toggle()</code> jQuery event method was removed in 1.9.
Question 6 : How many event handlers are bound to the .hover() method?
- There are 2 event handlers bound to the <code>.hover()</code> method.
Question 7 : The .select() form event method can only be used with text?
- Yes, the <code>.select()</code> form event method can only be used with <code>input type=text</code> and <code>textarea</code> elements.
Question 8 : The submit event can be triggered by clicking an <input type=image> element?
- Yes, the submit event can be triggered by clicking an <code>input type=image </code> element.
Question 9 : What method can we use instead of .focus() when we want to run an element's focus event handlers without setting focus on the element?
- We can use <code>.triggerhandler()</code> instead of <code>.focus()</code> when we want to run an element's focus event handlers without setting focus on the element.
Question 10 : Starting with jQuery version 1.7 more flexible event binding can be achieved using which method?
- Starting with jQuery version 1.7 more flexible event binding can be achieved using the <code>.on()</code> method.
Question 11 : Which jQuery method is used to preserve a reference to the calling object when the value of the this special operator is changed?
- The <code>jQuery.proxy()</code> method is used to preserve a reference to the calling object when the value of the <code>this</code> special operator is changed.
Question 12 : What is the preferred method of event delegation?
- The preferred method of event delegation is using the <code>.on()</code> method and <code>.off()</code> methods.
Question 13 : When an event reaches an element, all handlers bound to that event type for the element are fired, but in what order are mulitple handlers fired?
- If multiple handlers are registered for the element, they will always execute in the order in which they were bound.
Question 14 : What property do we use to find out the DOM element, or descendant thereof, that initiated the event.
- We use the <code>event.target</code> property to find out the DOM element, or descendant thereof, that initiated the event.
Question 15 : What property do we use to find out the key or button that was pressed for keyboard and mouse events?
- We use the <code>event.which</code> property to find out the key or button that was pressed for keyboard and mouse events.
Question 16 : A callbacks list can only be fired once?
- The default behaviour of a <code>callbacks</code> list is the same as an <code>event callback</code> list and so the list can be 'fired' multiple times. .
Question 17 : We have a choice of 4 flags to tailor the jQuery.Callbacks() method all of which are mutually exclusive?
- The 4 flags we can use with the <code>jQuery.Callbacks()</code> can be used in tandem to create a cumulative effect.
Question 18 : We can use the callbacks.empty() method to check whether a callbacks list is empty?
- The <code>callbacks.empty()</code> method will actually empty a <code>callbacks</code> list rather than check if it is empty.
Question 19 : A Deferred object can have one of three states, resolved, rejected and?
- The third state a <code>Deferred</code> object can have is <code>pending</code>.
Question 20 : We can protect our Deferred objects from state changes by other code by creating which object for the Deferred?
- We can protect our <code>Deferred</code> objects from state changes by other code by creating a <code>Promise</code> object for the <code>Deferred</code>.
Question 21 : Which method can we use for combining Deferred objects?
- We can use the <code>.when()</code> jQuery method for combining <code>Deferred</code> objects.
Question 22 : What does the term Ajax stands for?
- The term Ajax stands for Asynchronous JavaScript and XML.
Question 23 : What object do jQuery Ajax methods return?
- jQuery Ajax methods return a <code>jqXHR</code> object.
Question 24 : There are 3 Ajax Low-Level Interface Methods jQuery.ajax(), jQuery.ajaxSetup() and?
- The third Ajax Low-Level Interface Method is <code>jQuery.ajaxPrefilter()</code>
Question 25 : Which method do all the Ajax shorthand methods call under the bonnet?
- All the Ajax shorthand methods call the <code>jQuery.ajax()</code> method under the bonnet.
Question 26 : Which Ajax shorthand method is used to populate the matched element from the returned HTML on successful completion?
- We use the <code>.load()</code> Ajax shorthand method to populate the matched element from the returned HTML on successful completion.
Question 27 : Which Ajax shorthand method can we use instead of the following code?
$.ajax({
url: url,
dataType: 'html',
data: data,
success: callback
});
- We can use the <code>.load()</code> Ajax shorthand method for this code.
Question 28 : Which jQuery.param() Ajax method is used to create a serialized representation of an array or object, suitable for what?
- We use the <code>jQuery.param()</code> Ajax method to create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
Question 29 : Which jQuery Ajax method is used for form element string encryption?
- We use the <code>.serialize()</code> jQuery Ajax method for form element string encryption.
Question 30 : Which jQuery Ajax method is used in conjunction with the JSON.stringify() JavaScript method?
- We use the <code>.serializeArray()</code> jQuery Ajax method in conjunction with the <code>JSON.stringify()</code> JavaScript method.
Question 31 : How many Ajax global event handler methods are there?
- There are 6 Ajax global event handler methods.
Question 32 : The global event handler methods can be used as 'catch all' handlers for all Ajax requests that are made during the duration of a pages lifecycle?
- Yes, the global event handler methods can be used as 'catch all' handlers for all Ajax requests that are made during the duration of a pages lifecycle.
Quiz Progress Bar Please select an answer

What's Next?

Thats all the quizzes for the site, hope you enjoyed and learnt from them.

go to home page Homepage go to top of page Top