Jquery QUIZ questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Jquery: a. can be included in a file by host jquery on CDM (content delivery network). b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to select inputs with range method. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

a. can be included in a file by host jquery on CDM (content delivery network).

The click event works both like setter and getter in jquery which means that it: a. can be used to not only bind events but also initiate click events. b. need to select inputs with range method. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

a. can be used to not only bind events but also initiate click events.

Before we you create a DOM element using jquery, you can append another DOM element to it like so: $overaly.append($image) this: a. is a best practice. b. is object something is been done to. c. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. d. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. e. None of the Above

a. is a best practice.

To select the canvas element NOT the jquery representation, you: a. need to select $("canvas")[0] the first child element/item. b. need to select inputs with range method. c. can be used to not only bind events but also initiate click events. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

a. need to select $("canvas")[0] the first child element/item.

To select inputs with range method, you: a. need to use $("input[type=range]"). b. need to select inputs with range method. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

a. need to use $("input[type=range]").

To remove an element from html using jquery you: a. need to use $(this).remove() (this is object something is been done to. b. need to select $("canvas")[0] the first child element/item. c. need to select inputs with range method. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

a. need to use $(this).remove() (this is object something is been done to.

In jquery, to check if div parent has class "selected" you: a. need to use hasClass() after parent() is called, ex: if ( $anchor.hasClass("selected")) {}. b. need to select $("canvas")[0] the first child element/item. c. need to select inputs with range method. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

a. need to use hasClass() after parent() is called, ex: if ( $anchor.hasClass("selected")) {}.

To add and remove class to DOM element on click event you: a. need to use the siblings() removeClass and addClass methods ex: $(this).siblings().removeClass("selected") and $(this).addClass("selected"). b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

a. need to use the siblings() removeClass and addClass methods ex: $(this).siblings().removeClass("selected") and $(this).addClass("selected").

To show or hide matched elements ie toggle the visible property, you: a. need to use the toggle() method. b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

a. need to use the toggle() method.

To set the attribute of a DOM element in jquery you: a. need to write the attribute name and value ex: attr("src",href). b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to select inputs with range method. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

a. need to write the attribute name and value ex: attr("src",href).

Before we you create a DOM element using jquery, you: a. need to select inputs with range method. b. can append another DOM element to it like so: $overaly.append($image) this is a best practice. c. need to select $("canvas")[0] the first child element/item. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

b. can append another DOM element to it like so: $overaly.append($image) this is a best practice.

In jquery, to check if div parent has class "selected" you need to use hasClass() after parent(): a. is object something is been done to. b. is called, ex: if ( $anchor.hasClass("selected")) {}. c. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. d. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. e. None of the Above

b. is called, ex: if ( $anchor.hasClass("selected")) {}.

To fix the issue where user leaves drawing canvas and then reenters and the line: a. is still drawn, you need to bind mouseleave to mouseup event ex: mouseleave( function() { $canvas.mouseup(); });.

b. is object something is been done to. c. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. e. None of the Above a. is still drawn, you need to bind mouseleave to mouseup event ex: mouseleave( function() { $canvas.mouseup(); });.

The next method in jquery: a. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. b. is what goes to the immediate following sibling in the DOM hierarchy ex: $('#password').next() returns the next span after focus. c. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. d. is object something is been done to. e. None of the Above

b. is what goes to the immediate following sibling in the DOM hierarchy ex: $('#password').next() returns the next span after focus.

To add caption from an alt attribute inside an image inside a div element, you: a. need to select inputs with range method. b. need to search by its children, filter by img and then get the attr alt, ex: $(this).children("img").attr("alt"). c. need to select $("canvas")[0] the first child element/item. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

b. need to search by its children, filter by img and then get the attr alt, ex: $(this).children("img").attr("alt").

To fix the issue where user leaves drawing canvas and then reenters and the line is still drawn, you: a. need to bind mouseleave to mouseup event ex: mouseleave( function() { $canvas.mouseup(); });.

b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above a. need to bind mouseleave to mouseup event ex: mouseleave( function() { $canvas.mouseup(); });.

To write good jquery code, you: a. need to select $("canvas")[0] the first child element/item. b. need to specify the problem and then write a solution. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to select inputs with range method. e. None of the Above

b. need to specify the problem and then write a solution.

In css, to use a media query to hide menu item after 320px, you: a. need to select $("canvas")[0] the first child element/item. b. need to type @media (min-width: 320px) { #menu { display: none } }. c. need to select inputs with range method. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

b. need to type @media (min-width: 320px) { #menu { display: none } }.

In jquery to get parent by traversing the DOM, you: a. need to select $("canvas")[0] the first child element/item. b. need to use $anchor.parent(). c. need to select inputs with range method. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

b. need to use $anchor.parent().

To show or remove elements using jquery, you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. need to use the show() and hide() methods. c. need to select $("canvas")[0] the first child element/item. d. need to select inputs with range method. e. None of the Above

b. need to use the show() and hide() methods.

Jquery: a. need to select $("canvas")[0] the first child element/item. b. need to select inputs with range method. c. can be included in header with the following script: <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

c. can be included in header with the following script: <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>.

To bind event handler to trigger when the element: a. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. b. is object something is been done to. c. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. d. is called, ex: if ( $anchor.hasClass("selected")) {}. e. None of the Above

c. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks.

The prop() method in jquery: a. is object something is been done to. b. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. c. is the what allows the user to change the selected property of something, say prop("selected",true) sets option to be selected. d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. e. None of the Above

c. is the what allows the user to change the selected property of something, say prop("selected",true) sets option to be selected.

A good practice for problem specification: a. is object something is been done to. b. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. c. is to write down steps to solve problem after you write down solution. d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. e. None of the Above

c. is to write down steps to solve problem after you write down solution.

The focus event: a. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. b. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. c. is when the user clicks on the input field, can be manipulated with focus() method. d. is object something is been done to. e. None of the Above

c. is when the user clicks on the input field, can be manipulated with focus() method.

To change the color of div background color, you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. can be used to not only bind events but also initiate click events. c. need to select inputs with range method. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

c. need to select inputs with range method.

To determine if the submit event is enabled, you: a. need to select $("canvas")[0] the first child element/item. b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. d. need to select inputs with range method. e. None of the Above

c. need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());.

To add a click handler to a button with Jquery you: a. need to select $("canvas")[0] the first child element/item. b. need to select inputs with range method. c. need to write $("button").click(function() {});. d. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. e. None of the Above

c. need to write $("button").click(function() {});.

In jquery, to check if div parent: a. is object something is been done to. b. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. c. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. d. has class "selected" you need to use hasClass() after parent() is called, ex: if ( $anchor.hasClass("selected")) {}. e. None of the Above

d. has class "selected" you need to use hasClass() after parent() is called, ex: if ( $anchor.hasClass("selected")) {}.

Detached or disembodied class item: a. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. b. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. c. is object something is been done to. d. is a class or selected item that can be used programmatically to use in jquery. e. None of the Above

d. is a class or selected item that can be used programmatically to use in jquery.

To determine if the submit event: a. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. b. is called, ex: if ( $anchor.hasClass("selected")) {}. c. is object something is been done to. d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. e. None of the Above

d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());.

Convention for assigning jquery objects to variables: a. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. b. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. c. is object something is been done to. d. is to write $ before variable name ex: $variable = $('<div></div>'). e. None of the Above

d. is to write $ before variable name ex: $variable = $('<div></div>').

To select links from a div with id menu in jquery, you: a. need to select $("canvas")[0] the first child element/item. b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to select inputs with range method. d. need to add $("#menu a").each(function() {});. e. None of the Above

d. need to add $("#menu a").each(function() {});.

To create a representation of DOM element not part of document using jquery you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to select string of element to append to document $('<div id="some id"></div>'). e. None of the Above

d. need to select string of element to append to document $('<div id="some id"></div>').

To select a plain old JavaScript representation of a DOM element you: a. need to select $("canvas")[0] the first child element/item. b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to select inputs with range method. d. need to use $("element")[0]. e. None of the Above

d. need to use $("element")[0].

To find the attribute of href of a link you: a. need to select $("canvas")[0] the first child element/item. b. need to select inputs with range method. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to use attr("href") method on your jquery selection ex: $(this).attr("href"). e. None of the Above

d. need to use attr("href") method on your jquery selection ex: $(this).attr("href").

To bind event handler to trigger when the element is changed (on any type of form input) you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. need to select $("canvas")[0] the first child element/item. c. need to select inputs with range method. d. need to use change() method ex: $(this).change(function() {}); // will change how the input looks. e. None of the Above

d. need to use change() method ex: $(this).change(function() {}); // will change how the input looks.

Jquery To detect if someone moves a mouse around you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to use the method mousemove(). e. None of the Above

d. need to use the method mousemove().

Jquery To detect if someone releases a mouse button you: a. need to select $("canvas")[0] the first child element/item. b. need to select inputs with range method. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to use the method mouseup(). e. None of the Above

d. need to use the method mouseup().

In javascript to change browsers location you: a. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. b. need to select inputs with range method. c. need to select $("canvas")[0] the first child element/item. d. need to write window.location = href. e. None of the Above

d. need to write window.location = href.

Detached or disembodied class item is a class or selected item that: a. need to select inputs with range method. b. can be used to not only bind events but also initiate click events. c. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

e. None of the Above

Graceful degredation: a. is object something is been done to. b. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. c. is called, ex: if ( $anchor.hasClass("selected")) {}. d. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. e. None of the Above

e. None of the Above

The focus event is when the user clicks on the input field,: a. can be used to not only bind events but also initiate click events. b. need to type "event.preventDefault()" Example: $("#imageGallery a").click(function(event) { event.preventDefault();. c. need to select inputs with range method. d. need to select $("canvas")[0] the first child element/item. e. None of the Above

e. None of the Above

To cancel the default action you: a. need to select inputs with range method. b. can be used to not only bind events but also initiate click events. c. need to use $("input[type=range]"). d. need to select $("canvas")[0] the first child element/item. e. None of the Above

e. None of the Above

To remove an element from html using jquery you need to use $(this).remove() (this: a. is changed (on any type of form input) you need to use change() method ex: $(this).change(function() {}); // will change how the input looks. b. is when the user clicks on the input field, can be manipulated with focus() method. c. is called, ex: if ( $anchor.hasClass("selected")) {}. d. is enabled, you need to set the property of disbaled to be false or true ex: $("#submit").prop("disabled",!canSubmit());. e. None of the Above

e. None of the Above


Kaugnay na mga set ng pag-aaral

63. JavaScript Object Prototypes

View Set

SIMULATED TEST QUESTIONS - PRACTICE EXAM 3 - (please feel free to submit edits/corrections to Mike!)

View Set

Chapter 10 Use of Life Insurance

View Set

Chapter 5 - Running Water and Groundwater

View Set

National Unit 9 Practice of Real Estate

View Set

Lab Practices/ Microscopes + Scientific Method

View Set