jQuery Part-III
Sign in to Google to save your progress. Learn more
Why might you use custom events instead of shared helper functions? For example *
1 point
Captionless Image
Given this snippet of HTML, how can you get the value of the text field using jQuery? *
1 point
Captionless Image
Given this snippet of HTML and jQuery code, what will the result look like? *
1 point
Captionless Image
Which choice is an example of statement chaining? *
1 point
In the HTML and JavaScript below, the animations will all fire at once. How can you make them fire in sequence instead? *
1 point
Captionless Image
You want to write a plugin that creates a new traversal function—such as parent() and children()—and behaves like the ones jQuery includes out of the box. It needs to correctly modify the list of selections jQuery tracks internally, build up a list of additional items, and return the merged collection. What do you need to return on the last line of the function in order for this plugin to work correctly? *
1 point
Captionless Image
Given this checkbox, how can you determine whether a user has selected or cleared the checkbox? *
1 point
Captionless Image
What does this line of code do? *
1 point
Captionless Image
Below is a list of items that you want to be clickable and an event handler function. How can you assign the event handler to every item in the list in a way that is most performant, and also that ensures that the handler is called even if more items are added to the list programmatically? *
1 point
Captionless Image
Given this HTML list and subsequent two lines of jQuery, what is the difference in the behavior of .closest() and .parents()? *
1 point
Captionless Image
What is the difference between $('p').find('a') and $('p').children('a')? *
1 point
How can you ensure that some code executes only when a class active appears on an element? *
1 point
jQuery has a main function for handling AJAX, and several shorthand function including load() that make calling that main function easier. Given this HTML snippet, how can you insert only the second snippet from the source.html file (div#one) into the #load-me div on-demand via AJAX? *
1 point
Captionless Image
Which property of the jQuery event object references the DOM object that dispatched an event? *
1 point
51. There are some issues with this snippet of jQuery. First, it is manipulating CSS directly, rather than manipulating classes and leaving the CSS in stylesheets. What else in this code is best to avoid? *
1 point
Captionless Image
Consider the following markup, used to lay out three balls on the page, all hidden. How can you select the green ball, make it faded in over the course of three seconds, and log a console message when the animation has finished? *
1 point
Captionless Image
In some projects, jQuery is not included as a file with an obvious version number (if it has been run through a minifier or other code bundler, for example). How can you detect programmatically what version of jQuery is active? *
1 point
Submit
Clear form
This content is neither created nor endorsed by Google.