1. What is a particular performance concern when dealing with event handlers, and how can you cope with it?
2. If you JavaScript project involves a lot of DOM manipulation, but no AJAX or animation, which version of jQuery should you use?
3. What is the main difference between the contents() and children() functions?
4. You want to implement the behavior of an effect like slideDown() manually using animate(). What is one critical point you need to remember?
5. JQuery can create event handlers that execute exactly once. How is this done?
6. Which property of the jQuery event object references the DOM object that dispatched an event?
7. Given this snippet of HTML, how can you get the value of the text field using jQuery?
8. 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?
9. Given this checkbox, how can you determine whether a user has selected or cleared the checkbox?
10. What is the difference between $('p').find('a') and $('p').children('a')?
11. What does this line of code do? $('ul > li:first-child');
12. How can you ensure that some code executes only when a class active appears on an element?
13. Which choice is an example of statement chaining?
14. Which describes how jQuery makes working with the DOM faster?
15. When incorporating a plugin into a project, what are the important steps for basic installation and usage?
16. When using the clone() function to duplicate an element, what is one of the main concerns your code needs to watch out for?
17. How would you fire a callback when any AJAX request on a page has completed?
18. How do you change the current value of a text field with the class .form-item to "555-1212"?
19. How can you get an AJAX request to go through without triggering any of jQuery's AJAX events?
20. Along with DOM traversal and manipulation, jQuery offers several general-purpose helper functions that fill in some JavaScript gaps, especially before ES2015. Which is NOT a jQuery utility function?
21. What does $() mean in jQuery?
22. Let's say you have a page with just one link on it. How can you change the anchor tag so it links to example.com?
23. You're working on a site that uses an old version of jQuery, and you want to update to a newer version. What's the most efficient way to do so?
24. Which CSS selectors can you NOT use in jQuery?
25. What is the correct way to check how many paragraphs exist on a page using jQuery?
26. You want to create a custom right-click menu. How might you start the code?
27. What is the main difference between selectors and filters?
28. Though jQuery offers visual effects, it is considered a best practice to use CSS to set up different states triggered by classes, where it makes sense. What's the easiest way to enable and disable a class bounce on an element with the ID dialog?
29. Effects like show, hide, fadIn, and fadeOut can be called with no arguments, but can also take arguments for how long they should last. Which is NOT a duration argument supported by these functions?
30. What is tricky about jQuery's nth- filters (:nth-child, :nth-of-type, etc.) relative to other filters?
31. You want to work with AJAX using a Promise-like interface instead of nested callback functions. What jQuery API should you use?
32. When writing jQuery plugins, we often provide default options that may be overridden by the end user. What jQuery function is most useful for this purpose?
33. What is the difference between $('header').html() and $('header').text()?
34. Generally speaking, when used on a web page, how should jQuery be installed, and why?
35. Given the following HTML, how could we use one line to hide or show the button?Continue to checkout
36. What does the following line of code do? jQuery('p')
37. Which jQuery method can be used to make an ajax call?
38. Which is a single global function defined in the jQuery library?
39. Which will get the first column of all tables using jQuery?
40. What does this code snippet do? $(function() { //code });
41. Which value is/are valid argument(s) of eq() function?
42. Which jQuery object property displays version number of jQuery?
43. Is it true that we have to place the result of jQuery.getScript between tags in order to use the loaded script?
44. Which statement is not correct?
45. The result of code snippet? jQuery.unique([10, 20, 20, 30, 30, 10]);
46. Which correctly uses the replace() method?
47. Which jQuery method reduces the set of matched elements to the one at the specified index?
48. What does the parent selector do?
49. How would you check if an HTML element with an id of someElement exists in the DOM?
50. What does the method .one() do?
51. Which jQuery function can be used to filter out elements from a set of matched elements?
52. What does the method jQuery.getScript() do?
53. What is jQuery ?
54. Which is the correct method to remove a property for the set of matched element?
55. Which jQuery method adds the specified class if it is not present or remove the specified class if it is present?
56. Which jQuery method gets the children of each element in the set of matched elements?
57. Which jQuery method is used to perform an asynchronous HTTP request?
58. Which jQuery method remove all or the specified class(es) from the set of matched elements?
59. Which built-in method removes the last element from an array and returns that element?
60. How to select all element available in DOM with jQuery?
61. What does the method css() in jQuery do?
62. Which statement best describes the below code: $('span.item').each(function (index) { $(this).wrap('
63. Which jQuery method can be used to get the style property of an element?
64. What is the correct way of using a jQuery plugin?
65. Which method is used to create custom animations in jQuery?
66. Which jQuery method loads and executes a JavaScript file using an HTTP GET request?
67. Which is the correct way to debug JavaScript/jQuery event bindings with Firebug or a similar tool?
68. Which is the correct way to add an additional option and select it with jQuery?
69. Is there a way to show custom exception messages as an alert in a jQuery Ajax error message?
70. Which will show an alert containing the content(s) of a database selection?
71. How can this date '/Date(1224043200000)/' be changed to a short date format?
72. Which is/are correct to chain your plugin?
73. How would you successfully fetch some JSON data?
74. Please select the most efficient way(s) of appending a lot of elements to the DOM:
75. Which methods are no longer available in jQuery?
76. Which selector are not part of the CSS specification and therefore cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method?
77. Which is/are correct to set the src attribute of an image?
78. Which can be used to slide object?
79. How would you check if a checkbox element is checked?
80. Which is/are correct to attach a click event method that handles the click event of an element?
81. Which is correct to create an event and trigger it artificially?
82. Which ajax call is correct?
83. In $.ajax call which property settings is used to receive data upon successful completion of request?
84. Which is not an ajax function settings?
85. Which should be placed in the code below to alert data passed to event handler? function myHandler( event ) { // code .. select from the options below } $( '#box').on( 'click', { foo: 'bar' } , myHandler );
86. Fastest and most efficient way of hiding elements:
87. Which is correct to create default options for plugin, provided we pass 'options' to function?
88. How would you construct a performant array loop?
89. Which is better approach to create jQuery plugin?
90. To create your own jQuery Plugin which is correct?
91. Which is correct to select all elements having external site link?
92. What does jQuery .queue() function do?
93. Please select the fastest jQuery selector example:
94. To wrap text in element and give id as 'title'?
95. Which code can be used to stop default form submission?
96. Which is not correct to animate CSS properties?
97. Which is correct to remove id attribute from all H2 elements with in the 'content' class?
98. Which is correct to clone the tag in an and insert them after the tag inside tag?
99. You have a jQuery : $('.slides img').first().fadeOut(500).next().fadeIn(1000).end().appendTo('.slides'); Which one will be correct?
100. How would you disable an HTML button element with id myButton?
C#
Python
Ajax
Android Programming
Facebook (Programming & App Development)
Shopify
Related MCQ's