PLAY READ BLOG

Assess your experience with jQuery

I estimate it would take you 59 steps in 16 minutes to Assess your experience with jQuery.
One common misconception about jQuery is that it is a JavaScript framework, but it’s actually a ____.
  • Filesystem
  • Library
  • Extension
  • Toolset
The jQuery DOM manipulation method that returns or declares the value of form fields is ____.
  • surface()
  • text()
  • html()
  • val()
jQuery wraps multiple lines of code into a package so you can call upon functions with a single line of code.
  • True
  • False
What two terms are used to describe the moment an event is triggered?
  • Jum and Explode
  • Begin and Started
  • Activate and Enable
  • Fires and Fired
What jQuery method is used to insert content before a selected element?
  • prepend()
  • intro()
  • append()
  • before()
One major benefit of using jQuery is that it offers ____ compatibility.
  • Version
  • Binary
  • Single Platform
  • Cross-Browser
What jQuery method is used to insert content after a selected element?
  • after()
  • append()
  • final()
  • prepend()
What type of jQuery selector can be used to identify elements that make use of a specific class?
  • Title Selector
  • Search
  • Class Selector
  • Job Selector
The DOM or ____ is an application programming interface (API) for valid HTML and XML documents, and is used often by jQuery.
  • Document Object Model
  • Driving Object Model
  • Doorway of Magic
  • Development for Modeling
The jQuery DOM manipulation method that returns or declares content for selected elements is ____.
  • surface()
  • val()
  • text()
  • html()
What should your new jQuery object instance method do to ensure that it can participate in chaining with other such methods?
1. Invoke the end() method on the jQuery object when it's done executing.

2. Return the jQuery object it was invoked on.

3. Use $.queue() to insert itself into the sequence of chained method calls.

4. Return true if chaining is desired and false otherwise.

5. Return the selector string used to form the jQuery object.
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
Which jQuery method can be used to bind both the mouseover and the mouseout events?
  • toggle()
  • switch()
  • mouse()
  • hover()
  • change()
What does the following code do?

$('#myDiv').trigger('click');
1. When a click occurs on the element the trigger() method will be activated.

2. It initiates a non-bubbling version of the click event on the element.

3. It sets up an event trigger on the element. When a click occurs, the trigger is activated.

4. It simulates a click on the element and runs all the event handlers associated with it.

5. It activates a click on the element and then creates an event trigger.
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
Which term describes the jQuery feature that allows successive methods to be called on sets of elements?
  • Concatenation
  • Nesting
  • Outer join
  • Stringing
  • Chaining
What method is the primary means of attaching an event handler to an element?
  • on()
  • attach()
  • when()
  • link()
  • event()
💡FUN FACT 💡As of May 2019, jQuery is used on 79% of the top 1 million websites, and by 23% of all websites (according to BuiltWith)
Which jQuery function sets up a handler to fire when a form field's value changes?
  • update()
  • dirty()
  • change()
  • value()
  • val()
What does the $.get() jQuery function do?
1. It returns the DOM elements that are contained in the jQuery object.

2. It retrieves the value of one of a DOM element's properties.

3. It initiates an HTTP GET request to the server.

4. It returns "null" regardless of the success or failure of the element retrieval.

5. It returns true if the request's elements are successfully retrieved.
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
What does the following code do?

$(".foobar").find(".foo").fadeOut();
1. Fade out of all children of elements matching ".foobar"

2. Fade out of all descendants of elements matching ".foo" inside those matching ".foobar"

3. Fade out of elements matching ".foo" that are descendants of elements matching ".foobar"

4. Fade out of elements matching ".foobar"

5. Fade out of all elements matching ".foo"
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
How do you change the CSS property 'color' of an element?
  • $("#someID").css("color","red");
  • $("#someID").css("color:red");
  • $.css("#someID", "color:red");
  • $("#someID").prop("color", "red");
  • $("#someID")(style("color","red");
The complete callback in a jQuery Ajax request is called only after:
1. The Ajax request finishes, irrespective of error or success.

2. The Ajax request times out.

3. The Ajax request is fulfilled without errors.

4. The Ajax request fails.

5. If there is no success callback defined for the Ajax request.
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
Which part of the following statement represents the method invoked on the matching elements?

$('p').css('color','blue');
  • .css()
  • 'color'
  • 'blue'
  • $('p')
  • 'p'
How would you prevent the default browser action from an event handler without affecting other properties of the event flow?
1.
$a.on("click", function (e) {
/* code */
e.returnValue = false;
});

2.
$a.click(function (e) {
/* code */
e.preventDefault();
});

3.
$a.click(function () {
/* code */
return false;
});

4.
$a.click(function (e) {
/* code */
e.returnValue = false;
});
  • 1.
  • 2.
  • 3.
  • 4.
Which jQuery method is used to perform an asynchronous HTTP request?
  • jQuery.xhr()
  • jQuery.syncAjax()
  • jQuery.ajax()
  • jQuery.asyncAjax()
  • jQuery.ajaxSetup()
What does $('#myDiv').load('page.html') do?
1. It adds the string 'page.html' as the contents of the element with the ID myDiv.

2. It fires an Ajax request for page.html and injects the retrieved content into the element with the ID myDiv.

3. It appends the contents of page.html to the div with the ID myDiv.
  • 1.
  • 2.
  • 3.
For a custom animation, which method pauses the default animation queue for 1 second?
  • pause(1)
  • pause(1000)
  • delay(1000)
  • wait(1)
  • wait(1000)
What method is used to set one or more style properties for selected elements?
  • hasClass()
  • style()
  • html()
  • css()
  • text()
How do you obtain the value of a user input field?
  • field.getValue()
  • field.value()
  • field.selection()
  • field.val()
  • field.data()
What is the difference between width() and outerWidth()?
1. width() returns an integer value while outerWidth() returns a string that includes pixels (px) as its unit of measure.

2. width() returns the width of the element's innerHTML while outerWidth() returns the width of the element's outerHTML

3. No difference. width() is a shorthand alias for outerWidth()

4. width() returns the computed width of the element while outerWidth() returns the width in addition to the margins and padding.
  • 1.
  • 2.
  • 3.
  • 4.
95% of all 151 users completed this intention.
Get Started   

Or consider 125 other intentions.