Basic jQuery MCQ
1. What is a particular performance concern when dealing with event handlers, and how can you cope with it?
Finding which element an event occurred on is expensive. Assign most events to document.body and use .is() to act on the element of interest.
Some events, such as mousemove and scroll, happen a lot on a typical page. Debounce or throttle their handlers to make sure the handlers are not called more than you actually need.
Listening for an event that does not exist can create serious memory leaks. Be careful to spell event names correctly to avoid consuming too much memory.
DOM elements with an ID wil fire events more efficiently than with classes. Always use IDs instead of classes where possible.
Answer
Correct Answer:
Some events, such as mousemove and scroll, happen a lot on a typical page. Debounce or throttle their handlers to make sure the handlers are not called more than you actually need.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
2. If you JavaScript project involves a lot of DOM manipulation, but no AJAX or animation, which version of jQuery should you use?
JQuery 3 compressed
JQuery 3 slim
JQuery 2
None of these - jQuery requires AJAX
Answer
Correct Answer:
None of these - jQuery requires AJAX
Note: This Question is unanswered, help us to find answer for this one
Check Answer
3. What is the main difference between the contents() and children() functions?
They both return the content of selected nodes, but children() also includes text and comment nodes.
The contents() function only includes text nodes of the selected elements.
The children() function only includes text nodes of the selected elements.
They both return the content of selected nodes, but contents() also includes text and comment nodes.
Answer
Correct Answer:
They both return the content of selected nodes, but contents() also includes text and comment nodes.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
4. You want to implement the behavior of an effect like slideDown() manually using animate(). What is one critical point you need to remember?
SlideDown() requires animating the background color; doing so with animate() requires the jQuery Color plugin.
SlideDown() includes toggling visibility automatically. animate() does not automatically set any properties.
SlideDown() requires the element to have a height set in pixels. animate() does not.
Effects created with animate() must be run over at least 100 milliseconds, where slideDown() can run as quickly as 50ms.
Answer
Correct Answer:
SlideDown() includes toggling visibility automatically. animate() does not automatically set any properties.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
5. JQuery can create event handlers that execute exactly once. How is this done?
$('button').click(function() { console.log('this will only happen once'); }, false);
$('button').on('click', function() { console.log('this will only happen once'); }).off('click');
$('button').once('click', function() { console.log('this will only happen once'); });
$('button').one('click', function() { console.log('this will only happen once'); });
Answer
Correct Answer:
$('button').one('click', function() { console.log('this will only happen once'); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
6. Which property of the jQuery event object references the DOM object that dispatched an event?
Target
Self
Source
Object
Note: This Question is unanswered, help us to find answer for this one
Check Answer
7. Given this snippet of HTML, how can you get the value of the text field using jQuery?
$('input[type=text]').val()
$('.form-control').val()
All of these answers
$('#firstName').val()
Answer
Correct Answer:
All of these answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
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?
JQuery.version()
JQuery.jquery
JQuery.prototype.version
JQuery.fn.jquery
Answer
Correct Answer:
JQuery.fn.jquery
Note: This Question is unanswered, help us to find answer for this one
Check Answer
9. Given this checkbox, how can you determine whether a user has selected or cleared the checkbox?
By checking the value of $('#same-address').val()
By checking the value of $('#same-address').prop('checked')
By checking the value of $('#same-address').attr('checked')
By checking the value of $('#same-address').checked
Answer
Correct Answer:
By checking the value of $('#same-address').prop('checked')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
10. What is the difference between $('p').find('a') and $('p').children('a')?
Find() traverses only one level down, whereas children() selects anything inside the original element
$('p').find('a') finds all paragraphs inside links, whereas $('p').children('a') finds links within paragraph tags
.find() always searches the entire DOM tree, regardless of the original selection .children() searches only the immediate childern of an element
Children() traverses only one level down, whereas find() selects anything inside the original element
Answer
Correct Answer:
Children() traverses only one level down, whereas find() selects anything inside the original element
Note: This Question is unanswered, help us to find answer for this one
Check Answer
11. What does this line of code do? $('ul > li:first-child');
Selects the first list item inside all unordered lists on the page
Selects the first list item inside the first unordered list on the page
Selects the first element inside any list items on the page
Creates a predefined CSS selector that can be reused later
Answer
Correct Answer:
Selects the first list item inside all unordered lists on the page
Note: This Question is unanswered, help us to find answer for this one
Check Answer
12. How can you ensure that some code executes only when a class active appears on an element?
$('.element').attr('class', 'active')
$('.element').with('.active')
$('.element').hasClass('active')
$('.active').then()
Answer
Correct Answer:
$('.element').hasClass('active')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
13. Which describes how jQuery makes working with the DOM faster?
JQuery optimizes the DOM in a background thread, making updates faster.
JQuery avoids using the DOM at all.
JQuery uses a virtual DOM that batches updates, making inserts and deletes faster.
JQuery code to perform DOM manipulation is shorter and easier to write, but does not make DOM operations faster.
Answer
Correct Answer:
JQuery code to perform DOM manipulation is shorter and easier to write, but does not make DOM operations faster.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
14. When incorporating a plugin into a project, what are the important steps for basic installation and usage?
The jQuery script tag must come first, followed by the plugin, followed by your custom scripts, all preferably at or near the bottom of the page.
Your custom scripts must appear first in the document , followed by jQuery, followed by the plugin.
The jQuery script tag and the plugin script tag must appear in the document , and your custom scripts can follow anywhere on the page.
The jQuery script tag must appear in the document , but the plugin and your custom scripts can appear anywhere else in any order.
Answer
Correct Answer:
The jQuery script tag must come first, followed by the plugin, followed by your custom scripts, all preferably at or near the bottom of the page.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
15. When using the clone() function to duplicate an element, what is one of the main concerns your code needs to watch out for?
The clone() function may ignore data attributes on the original elements.
The clone() function may result in elements with duplicate ID attributes.
The clone() function may remove CSS classes from the cloned elements.
The clone() function may not respect the attribute order of the original elements.
Answer
Correct Answer:
The clone() function may result in elements with duplicate ID attributes.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
16. How would you fire a callback when any AJAX request on a page has completed?
$('body').ajaxComplete(function() { console.count('An AJAX request completed'); });
$(document).on('ajax-complete', function() { console.count('An AJAX request completed'); });
$('body').on('ajaxComplete', function() { console.count('An AJAX request completed'); });
$(document).ajaxComplete(function() { console.count('An AJAX request completed'); });
Answer
Correct Answer:
$(document).ajaxComplete(function() { console.count('An AJAX request completed'); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
17. How do you change the current value of a text field with the class .form-item to "555-1212"?
$.val('.form-item', '555-1212');
$('.form-item').val('555-1212');
$('.form-item').data('value', '555-1212');
$('.form-item').set('value', '555-1212');
Answer
Correct Answer:
$('.form-item').val('555-1212');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
18. How can you get an AJAX request to go through without triggering any of jQuery's AJAX events?
Set the type option to none
Set the processData option to false.
Set a success callback that returns false.
Set the option global to false.
Answer
Correct Answer:
Set the option global to false.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
19. 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?
JQuery.each, a general purpose iterator for looping over arrays or objects
JQuery.isNumeric, which can check whether its argument is, or looks like, a number
JQuery.extend, which can merge objects and make complete deep copies of objects
JQuery.isMobile, which can tell whether the user is using a mobile browser
Answer
Correct Answer:
JQuery.isMobile, which can tell whether the user is using a mobile browser
Note: This Question is unanswered, help us to find answer for this one
Check Answer
20. What does $() mean in jQuery?
It is an alias to the main core method of jQuery itself—the same as writing jQuery().
It is a utility function that selects the first element from the document.
It is a shorter way to write document.getElementById().
It is a utility function that selects the last element from the document.
Answer
Correct Answer:
It is an alias to the main core method of jQuery itself—the same as writing jQuery().
Note: This Question is unanswered, help us to find answer for this one
Check Answer
21. 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?
$('a').attribute('href', 'http://www.example.com')
$('a').attr('href', 'http://www.example.com')
$('a').data('href', 'http://www.example.com')
$('a').href('http://www.example.com')
Answer
Correct Answer:
$('a').attr('href', 'http://www.example.com')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
22. 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?
Install the newer version of jQuery, go through each script one by one, and fix what looks broken.
Read the change notes for the newer version of jQuery, fix all scripts, install the newer version, and fix anything that remains broken.
Install the newer version of jQuery as well as its Migrate plugin, fix all warnings, and uninstall the Migrate plugin.
Install the newer version of jQuery at the same time, and use jQuery.noConflict() on pages that need the older version.
Answer
Correct Answer:
Install the newer version of jQuery as well as its Migrate plugin, fix all warnings, and uninstall the Migrate plugin.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
23. Which CSS selectors can you NOT use in jQuery?
You cannot use multiple class selectors such as .class1.class2.
You cannot use pseudo-classes such as :not or :last-of-type.
You cannot use IDs and classes together, such as #element.class.
None. All CSS selectors are compatible in jQuery.
Answer
Correct Answer:
None. All CSS selectors are compatible in jQuery.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
24. What is the correct way to check how many paragraphs exist on a page using jQuery?
$('p').count()
$('p').length
$('*').find('p')
$('p').length()
Answer
Correct Answer:
$('p').length
Note: This Question is unanswered, help us to find answer for this one
Check Answer
25. You want to create a custom right-click menu. How might you start the code?
$('#canvas').on('click.right', function(){ console.log('Handled a right-click') });
$('#canvas').on('contextual', function(){ console.log('Handled a right-click') });
$('#canvas').on('contextmenu', function(){ console.log('Handled a right-click') });
$('#canvas').on('rightclick', function(){ console.log('Handled a right-click') });
Answer
Correct Answer:
$('#canvas').on('contextmenu', function(){ console.log('Handled a right-click') });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
26. What is the main difference between selectors and filters?
Selectors are used to refine the content that filters have been applied to.
Selectors are used to find and select content in a page. Filters are used to refine the results of selectors.
Filters are used to remove content from the page. Selectors are used to add content to the page
There is no real difference. They are both used to build up lists of page content.
Answer
Correct Answer:
Selectors are used to find and select content in a page. Filters are used to refine the results of selectors.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
27. 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?
$('#dialog').classToggle('bounce')
$('#dialog.bounce').removeClass().addClass()
$('#dialog').addOrRemoveClass('bounce')
$('#dialog').toggleClass('bounce')
Answer
Correct Answer:
$('#dialog').toggleClass('bounce')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
28. 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?
fast
extreme
2000
slow
Note: This Question is unanswered, help us to find answer for this one
Check Answer
29. What is tricky about jQuery's nth- filters (:nth-child, :nth-of-type, etc.) relative to other filters?
Referring to lists of items, they are 1-indexed (like CSS), not 0-indexed (like JavaScript).
They don't return the jQuery object, and cannot be chained.
They can return the wrong items if the DOM was recently manipulated.
They are not part of CSS, so they don't get the performance benefits of passing through the document.querySelectorAll.
Answer
Correct Answer:
Referring to lists of items, they are 1-indexed (like CSS), not 0-indexed (like JavaScript).
Note: This Question is unanswered, help us to find answer for this one
Check Answer
30. You want to work with AJAX using a Promise-like interface instead of nested callback functions. What jQuery API should you use?
JQuery.sub
JQuery.ajaxTransport
JQuery.Deferred
JQuery.proxy
Answer
Correct Answer:
JQuery.Deferred
Note: This Question is unanswered, help us to find answer for this one
Check Answer
31. 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?
$.extend
$.clone
$.fn.extend
$.merge
Note: This Question is unanswered, help us to find answer for this one
Check Answer
32. What is the difference between $('header').html() and $('header').text()?
$('header').html() returns the inner HTML of the header. $('header').text() returns only the text
$('header').html() returns only the HTML tags used, without the text. $('header').text() returns only the text
$('header').html() strips all HTML from the header. $('header').text() always returns an empty string.
$('header').html() returns all headers in an HTML document. $('header').text() the first line of a text file.
Answer
Correct Answer:
$('header').html() returns the inner HTML of the header. $('header').text() returns only the text
Note: This Question is unanswered, help us to find answer for this one
Check Answer
33. Generally speaking, when used on a web page, how should jQuery be installed, and why?
Just before the closing body tag, because we want to avoid blocking other resources from loading, and we use the ready method to make sure our code fires after the DOM is ready
Using the highest version number possible because only jQuery 3 and up are compatible with Internet Explorer 7
In the head tag because we want jQuery available as soon as possible
From a CDN because we want to be able to use jQuery online or offline
Answer
Correct Answer:
Just before the closing body tag, because we want to avoid blocking other resources from loading, and we use the ready method to make sure our code fires after the DOM is ready
Note: This Question is unanswered, help us to find answer for this one
Check Answer
34. Given the following HTML, how could we use one line to hide or show the button?Continue to checkout
$('.btn-primary').toggle();
$('.btn-primary').showHide();
$('.btn-primary').not(':visible').show();
$('.btn-primary').css({ display: 'block'});
Answer
Correct Answer:
$('.btn-primary').toggle();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
35. What does the following line of code do? jQuery('p')
Loads a paragraph tag from a remote server using AJAX
Aliases jQuery to a variable p
Selects all paragraphs on the page
Creates a new paragraph tag and inserts it into the body tag
Answer
Correct Answer:
Selects all paragraphs on the page
Note: This Question is unanswered, help us to find answer for this one
Check Answer
36. Which of the following jQuery method can be used to make an ajax call?
ready(url, [data], [callback] )
load( url, [data], [callback] )
reload(url, [data], [callback] )
None of the above.
Answer
Correct Answer:
load( url, [data], [callback] )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
37. Which of the following is a single global function defined in the jQuery library?
$()
jQuery()
Queryanalysis()
None of these methods
Note: This Question is unanswered, help us to find answer for this one
Check Answer
38. Which of the following will get the first column of all tables using jQuery?
$('table.tblItemTemplate first-child');
$('table.tblItemTemplate tr:first-child');
$('table.tblItemTemplate td:first-child');
$('tabletblItemTemplate td:first-child');
Answer
Correct Answer:
$('table.tblItemTemplate td:first-child');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
39. What does this code snippet do? $(function() { //code });
Runs the jQuery code when the DOM is ready.
Encapsulates the jQuery code protecting it from other code.
It essentially does the same thing as $(window).load() function.
All of the above
Answer
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
40. Which of the following values is/are valid argument(s) of eq() function?
1
'2'
-1
All are invalid
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
41. Which of the following jQuery object property displays version number of jQuery?
.jquery
.version
.ver
.versoinNo
Note: This Question is unanswered, help us to find answer for this one
Check Answer
42. Is it true that we have to place the result of jQuery.getScript between tags in order to use the loaded script?
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
43.
Which of the following statements is not correct?
$(‘div’).data(‘meaning’) === true;
$(‘div’).data(‘options’).name === ‘Douglas’;
$(‘div’).data(‘last-Value’) === 42;
Both 2 and 3.
Answer
Correct Answer:
Both 2 and 3.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
44.
What is the result of the following code snippet? jQuery.unique([10, 20, 20, 30, 30, 10]);
[10, 20, 30].
[30, 20, 10]
[10, 10, 20 ,20 , 30, 30]
None of the above.
Answer
Correct Answer:
[10, 20, 30].
Note: This Question is unanswered, help us to find answer for this one
Check Answer
45.
Which of the following correctly uses the replace() method?
var valr='r'; valr.replace('r', 't'); $('.try').prepend('
' + valr + '
');
var valr='r'; valr = valr.replace('r', 't'); $('.try').prepend('
'+valr+'
');
var valr='r'; valr = valr.replace('r' 't', 'rt'); $('.try').prepend('
'+valr+'
');
None of these.
Answer
Correct Answer:
var valr='r'; valr = valr.replace('r', 't'); $('.try').prepend(' '+valr+'
');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
46.
Which jQuery method reduces the set of matched elements to the one at the specified index?
eq(index)
filter(index)
filterOne(index)
eqOne(index)
Answer
Correct Answer:
eq(index)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
47.
What does the parent selector do?
Selects all elements that have no siblings with the same element name.
Selects all elements that have at least one child node (either an element or text).
Selects all elements that are the only child of their parent.
Selects all elements that are the nth-child of their parent.
Answer
Correct Answer:
Selects all elements that have at least one child node (either an element or text).
Note: This Question is unanswered, help us to find answer for this one
Check Answer
48.
How would you check if an HTML element with an id of someElement exists in the DOM?
if ($(‘#someElement’).is(‘:visible’) == ‘true’)
if ($(‘#someElement’).length)
if ($(‘#someElement’).exists())
None of the above
Answer
Correct Answer:
if ($(‘#someElement’).length)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
49.
What does the method .one() do?
Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
Attach an event handler for all elements which match the current selector, now and in the future.
Attach an event handler function for one or more events to the selected elements.
Attach a handler to an event for the elements.
Answer
Correct Answer:
Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
50.
What does the method jQuery.getScript() do?
Load a JavaScript file from the server using a GET HTTP request.
Load a JavaScript file from the server using a GET HTTP request, then execute it.
Load data from the server using a HTTP GET request.
Load data from the server and place the returned HTML into the matched element.
Answer
Correct Answer:
Load a JavaScript file from the server using a GET HTTP request, then execute it.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
51.
What is jQuery ?
JavaScript Library
Json Library
Jsonp Library
Css Library
Answer
Correct Answer:
JavaScript Library
Note: This Question is unanswered, help us to find answer for this one
Check Answer
52.
Which is the correct method to remove a property for the set of matched element?
.removeProp()
.removeProperties()
.moveProp()
None of the above
Answer
Correct Answer:
.removeProp()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
53.
Which of the following jQuery method adds the specified class if it is not present or remove the specified class if it is present?
toggleClass(class)
toggleClassName(class)
changeClass(class)
changeClassName(class)
Answer
Correct Answer:
toggleClass(class)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
54.
Which of the following jQuery method gets the children of each element in the set of matched elements?
children(selector)
getChildren(selector)
getChild(selector)
None of the above
Answer
Correct Answer:
children(selector)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
55.
Which jQuery method is used to perform an asynchronous HTTP request?
jQuery.ajaxSetup()
jQuery.ajaxAsync()
jQuery.ajax()
None of the mentioned
Answer
Correct Answer:
jQuery.ajax()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
56.
Which of the following jQuery method remove all or the specified class(es) from the set of matched elements?
removeClass(class)
removeStyleClass(class)
removeCSSClass(class)
remove(class)
None of the above
Answer
Correct Answer:
removeClass(class)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
57.
Which built-in method removes the last element from an array and returns that element?
last()
get()
pop()
remove()
None of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
58.
How to select all element available in DOM with jQuery?
$("*")
$("?")
$("#")
$(".")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
59.
What does the method css() in jQuery do?
Return a style property on the first matched element.
Set a single style property to a value on all matched elements.
Set a single style property to a value on all matched elements.
All of the mentioned
Answer
Correct Answer:
All of the mentioned
Note: This Question is unanswered, help us to find answer for this one
Check Answer
60.
Which of the following statements best describes the below code: $('span.item').each(function (index) { $(this).wrap('<p></p>'); });
Wraps each span tag that has class item within a p tag.
Inserts each span tag that has class item into a p tag.
Inserts Item into each span that has item class.
Replaces each span tag that has class item with a Item.
Answer
Correct Answer:
Wraps each span tag that has class item within a p tag.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
61.
Which jQuery method can be used to get the style property of an element?
getStyle(propertyname)
obtainStyle(propertyname)
css(propertyname)
None of the above
Answer
Correct Answer:
css(propertyname)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
62.
Which of the following method is used to create custom animations in jQuery?
css()
animate()
animation()
start_animation()
Answer
Correct Answer:
animation()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
63.
Which of the following jQuery method loads and executes a JavaScript file using an HTTP GET request?
jQuery.get( url, [data], [callback], [type] )
jQuery.getJSON( url, [data], [callback] )
jQuery.getScript( url, [callback] )
jQuery.post( url, [data], [callback], [type] )
None of the above
Answer
Correct Answer:
jQuery.getScript( url, [callback] )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
64.
Which of the following is the correct way to debug JavaScript/jQuery event bindings with Firebug or a similar tool?
var clickEvents = $('#foo').data("events").click; jQuery.each(clickEvents, function(key, value) { console.log(value) // prints "function() { console.log('clicked!') }" })
$.fn.listHandlers = function(events, outputFunction) { return this.each(function(i){ var elem = this, dEvents = $(this).data('events'); if (!dEvents) {return;} $.each(dEvents, function(name, handler){ if((new RegExp('^(' + (events === '*' ? '.+' : events.replace(',','|').replace(/^on/i,'')) + ')$' ,'i')).test(name)) { $.each(handler, function(i,handler){ outputFunction(elem, '\n' + i + ': [' + name + '] : ' + handler ); }); } }); }); };
var clickEvents = $('#foo').data("events").click; jQuery.each(clickEvents, function(key, value) { event.console.log(value); })
$.fn.listHandlers = function(events, outputFunction) { return this.each(function(i){ var elem = this, dEvents = $(this).data('events'); $.each(dEvents, function(name, handler){ if((new RegExp('^(' + (events === '*' ? '.+' : events.replace(',','|').replace(/^on/i,'')) + ')$' ,'i')).test(name)) { $.each(handler, function(i,handler){ outputFunction(elem, '\n' + i + ': [' + name + '] : ' + handler ); }); } }); }); };
Answer
Correct Answer:
var clickEvents = $('#foo').data("events").click; jQuery.each(clickEvents, function(key, value) { console.log(value) // prints "function() { console.log('clicked!') }" })
Note: This Question is unanswered, help us to find answer for this one
Check Answer
65.
Which of the following is the correct way to add an additional option and select it with jQuery?
$('#mySelect').append('<option value="whatever">text</option>').val('whatever')
$('#mySelect').html('<option value="whatever">text</option>').val('whatever')
$('#mySelect').text('<option value="whatever">text</option>').val('whatever')
$('#mySelect').val('whatever')
Answer
Correct Answer:
$('#mySelect').append('<option value="whatever">text</option>').val('whatever')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
66.
Is there a way to show custom exception messages as an alert in a jQuery Ajax error message?
jQuery.ajax({// just showing error property error: function(jqXHR,error, errorThrown) { if(jqXHR.status&&jqXHR.status==400){ alert(jqXHR.responseText); }else{ alert("Something went wrong"); } } });
$.ajax({ type: "post", url: "/SomeController/SomeAction", success: function (data, text) { //... }, error: function (request, status, error) { alert(request.responseText); } });
.error(function (response, q, t) { var r = jQuery.parseJSON(response.responseText); });
jQuery.ajax({ type: "POST", url: "saveuser.do", dataType: "html", data: "userId=" + encodeURIComponent(trim(document.forms[0].userId.value)), success: function (response) { jQuery("#usergrid").trigger("reloadGrid"); clear(); alert("Details saved successfully!!!"); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } });
Answer
Correct Answer:
jQuery.ajax({// just showing error property error: function(jqXHR,error, errorThrown) { if(jqXHR.status&&jqXHR.status==400){ alert(jqXHR.responseText); }else{ alert("Something went wrong"); } } });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
67.
Which of the following will show an alert containing the content(s) of a database selection?
$.ajax({ type: "GET", url: "process_file.php?comp_id="+comp_id, success: function (result) { alert(result); } });
$.ajax({ type: "GET", success: function (result) { alert(result); } });
$.ajax({ type: "GET", url: "process_file.php?comp_id="+comp_id, error: function (result) { alert(result); } });
$.ajax({ type: "GET", url: "process_file.php?comp_id="+comp_id, Complete: function (result) { alert(result); } });
Answer
Correct Answer:
$.ajax({ type: "GET", url: "process_file.php?comp_id="+comp_id, success: function (result) { alert(result); } });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
68.
How can this date "/Date(1224043200000)/" be changed to a short date format?
var date = new Date(parseInt(jsonDate.substr(6)));
var newDate = dateFormat(jsonDate, "mm/dd/yyyy");
var thedate = Date(1224043200000); alert(thedate);
replace(/\/Date\((.*?)\)\//gi, "new Date($1)");
Answer
Correct Answer:
var date = new Date(parseInt(jsonDate.substr(6)));
Note: This Question is unanswered, help us to find answer for this one
Check Answer
69.
Which of the following is/are correct to chain your plugin?
(function($) { $.fn.helloWorld = function( customText ) { return this.each( function() { $(this).text( customText ); }); } }(jQuery));
(function($) { $.fn.helloWorld = function() { return this.each( function() { $(this).text("Hello, World!"); }); } }(jQuery));
(function($) { $.fn.helloWorld = function() { this.each( function() { $(this).text("Hello, World!"); }); } }(jQuery));
Answer
Correct Answer:
(function($) { $.fn.helloWorld = function( customText ) { return this.each( function() { $(this).text( customText ); }); } }(jQuery)); (function($) { $.fn.helloWorld = function() { return this.each( function() { $(this).text("Hello, World!"); }); } }(jQuery));
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
70.
How would you successfully fetch some JSON data?
$.getJSON(‘data.json', function(results) { // do something });
$.ajax({ type: ‘get’, url : ‘data.json', data : someData, dataType : 'json', success : function(results) { // do something }) });
$.ajax({ type: ‘get’, url : ‘data.json', data : someData, dataType : ‘script’, success : function(results) { // do something }) });
Answer
Correct Answer:
$.getJSON(‘data.json', function(results) { // do something }); $.ajax({ type: ‘get’, url : ‘data.json', data : someData, dataType : 'json', success : function(results) { // do something }) });
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
71.
Please select the most efficient way(s) of appending a lot of elements to the DOM:
$.each(elementsArray, function(i, item) { var newListItem = "
" + item + " ";
$(‘#list’).append(newListItem); });
var fragment = document.createDocumentFragment(); $.each(elements, function(i, item) { var newListItem = document.createElement(‘li’); var itemText = document.createTextNode(item); newListItem.appendChild(itemText); fragment.appendChild(newListItem); });
$(‘#list’)[0].appendChild(fragment);
var output = ‘’; $.each(elements, function(i, item) { output += ‘
’ + item + ‘ ’; }); $(‘#list’).html(output);
Answer
Correct Answer:
var fragment = document.createDocumentFragment(); $.each(elements, function(i, item) { var newListItem = document.createElement(‘li’); var itemText = document.createTextNode(item); newListItem.appendChild(itemText); fragment.appendChild(newListItem); });
$(‘#list’)[0].appendChild(fragment); var output = ‘’; $.each(elements, function(i, item) { output += ‘’ + item + ‘ ’; }); $(‘#list’).html(output);
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
72.
Which of the following methods are no longer available in jQuery?
bind()
live()
load()
serialize()
size()
Answer
Correct Answer:
bind() live() load() size()
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
73.
Which of the following selectors are not part of the CSS specification and therefore cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method?
:animated
:checkbox
.class
:focus
:image
:last-child
:nth-of-type()
:visible
Answer
Correct Answer:
:checkbox :image
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
74.
Which of the following is/are correct to set the src attribute of an image?
$("#image").attr("src", "photo.jpg");
$("#image").attrib("src", "photo.jpg");
$("#image").attr( {"src": "photo.jpg" });
$("#image").attr("img", "photo.jpg");
Answer
Correct Answer:
$("#image").attr("src", "photo.jpg"); $("#image").attr( {"src": "photo.jpg" });
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
75.
Which of the following can be used to slide object?
slideDown()
slideToggle()
slideUp()
animate()
Answer
Correct Answer:
slideDown() slideToggle() slideUp() animate()
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
76.
How would you check if a checkbox element is checked?
$(‘input[type=“checkbox”]:checked’).val();
$('input[type="checkbox”]’).is(‘:checked’);
$(‘input[type=“checkbox”]’).prop(‘checked’);
Answer
Correct Answer:
$('input[type="checkbox”]’).is(‘:checked’); $(‘input[type=“checkbox”]’).prop(‘checked’);
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
77.
Which of the following is/are correct to attach a click event method that handles the click event of an element?
$(".content h2").click(function() { // Code goes here });
$(".content h2").on("click", "h2", function() { // Code goes here });
$(".content").click("h2", function() { // Code goes here });
$(".content h2").onclick(function() { // Code goes here });
Answer
Correct Answer:
$(".content h2").click(function() { // Code goes here }); $(".content h2").on("click", "h2", function() { // Code goes here });
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
78.
Which of the following is correct to create an event and trigger it artificially?
var e = jQuery.EventObject("click"); jQuery("body").trigger(e);
var e = jQuery.Event("click"); jQuery("body").call(e);
var e = jQuery.Event("click"); jQuery("body").target(e);
var e = jQuery.Event("click"); jQuery("body").trigger(e);
Answer
Correct Answer:
var e = jQuery.Event("click"); jQuery("body").trigger(e);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
79.
Which of the following ajax call is correct?
$.ajax({ type: "get", get: "hello.xml", dataType: "xml" });
$.ajax({ type: "get", url: "hello.xml", dataType: "xml" });
$.ajax({ type: "post", file: "hello.xml", dataType: "xml" });
$.ajax({ type: "get", file: "hello.xml", dataType: "json" });
Answer
Correct Answer:
$.ajax({ type: "get", url: "hello.xml", dataType: "xml" });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
80.
In $.ajax call which of the following property settings is used to receive data upon successful completion of request?
finish:
complete:
data:
success:
Note: This Question is unanswered, help us to find answer for this one
Check Answer
81.
Which of the following is not an ajax function settings?
datatype
error
xml
password
Note: This Question is unanswered, help us to find answer for this one
Check Answer
82.
Which of the following 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 );
alert( event.data.foo);
alert( event.foo);
alert( event.property.foo);
alert( event.object.foo);
Answer
Correct Answer:
alert( event.data.foo);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
83.
Select the fastest and most efficient way of hiding elements:
$('#someElement p.someClass').hide();
$('#someElement’).find('p.someClass').hide();
$('#someElement p’).filter(‘:has(.someClass)’).hide();
Answer
Correct Answer:
$('#someElement’).find('p.someClass').hide();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
84.
Which of the following is correct to create default options for plugin, provided we pass 'options' to function?
var options = $.extend({ text : 'Hello, World!', color : red, }, settings);
var settings = $.default({ text : 'Hello, World!', color : red, }, options);
var settings = $.extend({ text : 'Hello, World!', color : red, }, options);
Answer
Correct Answer:
var settings = $.extend({ text : 'Hello, World!', color : red, }, options);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
85.
How would you construct a performant array loop?
var arrayLength = myArray.length; for (var i = 0; i < arrayLength; i++) { // do something }
for (var i = 0; i < myArray.length; i++) { // do something }
$.each(myArray, function(index, value) { // do domething });
Answer
Correct Answer:
$.each(myArray, function(index, value) { // do domething });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
86.
Which of the following is better approach to create jQuery plugin?
(function( $ ) { $.fn.openMenu = function() { // Open Menu code. }; $.fn.closeMenu = function() { // Close Menu code. }; }( jQuery ));
(function( $ ) { $.fn.menu = function( action ) { if ( action === "open") { // Open Menu code. } if ( action === "close" ) { // Close Close code. } }; }( jQuery ));
(function( $ ) { $.fn.openMenu = function( action ) { if ( action === "open") { // Open Menu code. } }; $.fn.closeMenu = function( action ) { if ( action === "close" ) { // Close Close code. } }; }( jQuery ));
Answer
Correct Answer:
(function( $ ) { $.fn.menu = function( action ) { if ( action === "open") { // Open Menu code. } if ( action === "close" ) { // Close Close code. } }; }( jQuery ));
Note: This Question is unanswered, help us to find answer for this one
Check Answer
87.
Which of the following is correct to select all elements having external site link?
$("a[href^='://']");
$("a href^='http://'");
$("a[href=^'http://']");
$("a[href^='http://']");
Answer
Correct Answer:
$("a[href^='http://']");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
88.
What does jQuery .queue() function do?
Queue up animation functions so they can run synchronously.
Queue up animation functions so they can run asynchronously.
There is no difference between .queue() and .animate() callback function.
jQuery has no such function.
Answer
Correct Answer:
Queue up animation functions so they can run asynchronously.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
89.
Please select the fastest jQuery selector example:
$(’a[data-selected=“true”] img’)
$(‘#image’)
$(‘a.selected img’)
Answer
Correct Answer:
$(‘#image’)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
90.
To wrap text in element and give id as "title"?
$("h1").wrap("<a id='title'></a>");
$("h1").wrapInner("<a id='title'></a>");
$("h1").wrapAll("<a id='title'></a>");
$("h1").wrapInside("<a id='title'></a>");
Answer
Correct Answer:
$("h1").wrapInner("<a id='title'></a>");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
91.
Which of the following code can be used to stop default form submission?
$("form").submit(function(e){ e.preventDefault(); });
$("form").handleSubmit(function(e){ e.preventDefault(); });
$("form").onSubmit(function(e){ e.preventDefault(); });
$("form").catchSubmit(function(e){ e.preventDefault(); });
Answer
Correct Answer:
$("form").submit(function(e){ e.preventDefault(); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
92.
Which of the following is not correct to animate CSS properties?
$(".header").click(function() { $("#box").animate({background: "red"}); });
$(".header").click(function() { $("#box").animate({minHeight: "200px"}); });
$(".header").click(function() { $("#box").animate({fontSize: "20px"}); });
$(".header").click(function() { $("#box").animate({letterSpacing: "2px"}); });
Answer
Correct Answer:
$(".header").click(function() { $("#box").animate({background: "red"}); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
93.
Which of the following is correct to remove id attribute from all H2 elements with in the "content" class?
$(".content h2").removeAttr("id");
$("#content h2").removeAttrib("id");
$(".content.h2").removeAttr("id");
$(".content h2").removeAttrib("id");
Answer
Correct Answer:
$(".content h2").removeAttr("id");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
94.
Which of the following is correct to clone the tag in an and insert them after the tag inside tag?
$("article a").insertAfter($("aside h2")).clone();
$("article a").clone().insertAfter("aside h2");
$("article a").clone().insertAfter($("aside h2"));
Answer
Correct Answer:
$("article a").clone().insertAfter($("aside h2"));
Note: This Question is unanswered, help us to find answer for this one
Check Answer
95.
You have a jQuery : $(".slides img").first().fadeOut(500).next().fadeIn(1000).end().appendTo(".slides"); Which one of the following will be correct?
Append first element of the set to ".slides"
Append last element of the set to ".slides"
Append first and next elements of the set to ".slides"
Append whole set of img elements to ".slides"
Answer
Correct Answer:
Append whole set of img elements to ".slides"
Note: This Question is unanswered, help us to find answer for this one
Check Answer
96.
How would you disable an HTML button element with id myButton?
$(‘#myButton’).prop(‘disabled’, true);
$(‘#myButton’).attr(‘disabled’)=true
$(‘#myButton’).attr(‘disabled’);
Answer
Correct Answer:
$(‘#myButton’).prop(‘disabled’, true);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
97.
Which of the following is correct to remove first element in an article?
$("article a:first").empty();
$("article a:first").remove();
$("article a:first-child").remove();
$("article a first").remove();
Answer
Correct Answer:
$("article a:first").remove();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
98.
Which of the following will detect a change in the value of a hidden input?
$('#id_inpout').live('change',function () { var id_el = $(this).attr('id'); alert(id_el); });
$('#id_inpout').change(function () { var id_el = $(this).attr('id'); alert(id_el); });
$('#id_inpout').bind('change',function () { var id_el = $(this).attr('id'); alert(id_el); });
None of these.
Answer
Correct Answer:
None of these.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
99.
Which of the following is the best way to retrieve checkbox values in jQuery?
$('#cb checked').each(function() { $(this).val(); });
$('#cb :checked').each(function() { $(this).val(); });
$('input[type="checkbox"]').bind('click',function() { if($(this).is(':checked')) { $(this).val(); } });
None of the above.
Answer
Correct Answer:
$('#cb :checked').each(function() { $(this).val(); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
100.
Which is the fastest method to change the css of more than 20 elements on a page?
$(‘img.thumbnail’).css(‘border’, ‘1px solid #333333’);
$(’<style type=“text/css”>img.thumbnail { border: 1px solid #333; }</style>’).appendTo(‘head’);
$(‘img.thumbnail’).css(‘border’, ‘1px solid #333’);
Answer
Correct Answer:
$(’<style type=“text/css”>img.thumbnail { border: 1px solid #333; }</style>’).appendTo(‘head’);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
101.
Which is the fastest way of adding a lot of rows to a table?
$(‘#table').append('<tr><td>table row #1</td></tr> […] <tr><td>table row #100</td></tr>');
var table = $( “#table" ); var parent = table.parent(); table.detach(); table.append('<tr><td>table row #1</td></tr> […] <tr><td>table row #100</td></tr>'); parent.append(table);
$(‘#table tr:last').after('<tr><td>table row #1</td></tr> […] <tr><td>table row #100</td></tr>');
Answer
Correct Answer:
$(‘#table tr:last').after('<tr><td>table row #1</td></tr> […] <tr><td>table row #100</td></tr>');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
102.
Which of the following jQuery method gets the combined text contents of an element?
getText()
text()
getHtml()
getContent()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
103.
Which of the following jQuery selector selects element with the given element id some-id?
$('some-id')
$('#some-id')
$('.some-id')
None of the above.
Answer
Correct Answer:
$('#some-id')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
104.
Which of the following jQuery method sets the width property of an element?
width( value )
setWidth( value)
setCSSWidth( value )
None of the above.
Answer
Correct Answer:
width( value )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
105.
Which of the following jQuery method stops the rest of the event handlers from being executed?
preventDefault( )
stopImmediatePropagation( )
stopPropagation( )
None of the above.
Answer
Correct Answer:
stopImmediatePropagation( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
106.
What is the correct jQuery code to set the background color of all p elements to green?
$(“p”).layout(“background-color”,”green”);
$(“p”).style(“background-color”,”green”);
$(“p”).manipulate(“background-color”,”green”);
$(“p”).css(“background-color”,”green”);
Answer
Correct Answer:
$(“p”).css(“background-color”,”green”);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
107.
Which of the following jQuery method setups default values for future AJAX requests?
jQuery.ajax( options )
jQuery.ajaxSetup( options )
serialize( )
serializeArray( )
Answer
Correct Answer:
jQuery.ajaxSetup( options )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
108.
What does the jQuery .clone() function do?
Create a shallow copy of the set of matched elements excluding any attached events
Create a deep copy of the set of matched elements including any attached events.
Create a deep copy of the set of matched elements excluding any attached events.
Create a shallow copy of the set of matched elements including any attached events.
Answer
Correct Answer:
Create a deep copy of the set of matched elements including any attached events.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
109.
Which is the method that operates on the return value of $()
show()
click()
css()
done()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
110.
Which of the following jQuery method finds all sibling elements?
siblings(selector)
getSiblings(selector)
obtainSiblings(selector)
listSiblings(selector)
Answer
Correct Answer:
siblings(selector)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
111.
Which of the following jQuery method gets a set of elements containing the closest parent element that matches the specified selector, the starting element included?
getNearest( selector )
closest(selector)
getClosest( [selector])
None of the above.
Answer
Correct Answer:
closest(selector)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
112.
What is the difference between the .position() and the .offset() method?
The .position() method retrieves the current position relative to the offset parent, whereas the .offset() method retrieves the current position of an element relative to the document.
The .position() method retrieves the current position relative to the document, whereas the .offset() method retrieves the current position of an element relative to the offset parent.
Both methods retrieve the current position relative to the document.
Answer
Correct Answer:
The .position() method retrieves the current position relative to the offset parent, whereas the .offset() method retrieves the current position of an element relative to the document.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
113.
Standard effects queue in jQuery is named as?
fn
ef
xf
fx
Note: This Question is unanswered, help us to find answer for this one
Check Answer
114.
Which of the following jQuery method returns the outer height (including the border) of an element?
getCSSHeight( )
getHeight( )
outerHeight( [margin] )
None of the above.
Answer
Correct Answer:
outerHeight( [margin] )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
115.
Which of the following is not a jQuery utility method?
$.trim()
$.extend()
$.ajax()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
116.
How can an object be serialized to JSON with jQuery's standard methods?
var json_text = JSON.stringify(your_object, null, 2);
JSON.stringify(countries);
var your_object = JSON.parse(json_text);
JSON.convert.stringify(countries);
Answer
Correct Answer:
var json_text = JSON.stringify(your_object, null, 2); var your_object = JSON.parse(json_text);
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
117.
Which of the following jQuery method gets the current offset of the first matched element, in pixels, relative to the document?
offset( )
position( )
offsetParent( )
None of the above.
Answer
Correct Answer:
offset( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
118.
Which of the following jQuery method binds a handler to one or more events (like click) for an element?
load(type, [data], fn )
bind( type, [data], fn )
attach(type, [data], fn )
None of the above.
Answer
Correct Answer:
bind( type, [data], fn )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
119.
Which of the following jQuery method checks if event.preventDefault() was ever called on this event object?
isPropagationStopped( )
isDefaultPrevented( )
isImmediatePropagationStopped( )
None of the above.
Answer
Correct Answer:
isDefaultPrevented( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
120.
Which are the correct ways of listening for when the DOM is ready to be manipulated?
$(document).ready(function() { // DOM is ready });
$(window).load(function() { // DOM is ready });
$(function() { // DOM is ready });
Answer
Correct Answer:
$(document).ready(function() { // DOM is ready }); $(function() { // DOM is ready });
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
121.
Which of the following jQuery method serializes a set of input elements into a string of data?
serializeArray( )
serialize( )
jQuery.ajaxSetup( options )
jQuery.ajax( options )
Answer
Correct Answer:
serialize( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
122.
Which built-in method returns the calling string value converted to lower case?
toLowerCase()
toLower()
changeCase(case)
None of the above.
Answer
Correct Answer:
toLowerCase()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
123.
Which of the following jQuery method can be used to attach a function to be executed whenever AJAX request completed successfully?
ajaxStart( callback )
ajaxSuccess( callback )
ajaxSend( callback )
ajaxStop(callback)
Answer
Correct Answer:
ajaxStop(callback)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
124.
Which of the following methods allow us to insert new content surrounding existing content?
.unwrap()
.wrap()
.wrapAll()
.wrapInner()
All of the mentioned
Answer
Correct Answer:
All of the mentioned
Note: This Question is unanswered, help us to find answer for this one
Check Answer
125.
What is the best method to select all the radio inputs on a page?
$(‘:radio’);
$(‘*:radio’);
$(‘input:radio’);
Answer
Correct Answer:
$(‘input:radio’);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
126.
Which is the correct method to remove all matched elements from the DOM?
remove( expr)
removeAll( expr )
clear( expr)
None of the above.
Answer
Correct Answer:
remove( expr)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
127.
Which of the following jQuery selector selects elements by tag name?
$('tag')
$('#tag')
$('.tag')
None of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
128.
Which of the following jQuery method gets the height property of an element?
getHeight()
height()
getCssHeight()
None of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
129.
What will the following code do: $(document).ready(function() { $(this).bind("contextmenu", function(e) { e.preventDefault(); }); });
show context menu on page
don't show context menu on page when right clicked.
do nothing
disable context menu links
Answer
Correct Answer:
don't show context menu on page when right clicked.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
130.
Which of the following jQuery method prevents the browser from executing the default action?
preventDefault( )
stopImmediatePropagation( )
stopPropagation( )
None of the above.
Answer
Correct Answer:
preventDefault( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
131.
To select all the s and the s in a page?
$('div', 'span');
$('div, span');
$('div span');
$('div' 'span');
Answer
Correct Answer:
$('div, span');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
132.
Which built-in method returns the length of the string?
size()
length()
index()
None of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
133.
What is the output of the following program? #include main() { char s[] = "Hello\0Hi"; printf("%d %d", strlen(s), sizeof(s)); }
5 9
7 20
5 20
8 20
Note: This Question is unanswered, help us to find answer for this one
Check Answer
134.
Which one of the following is not a jQuery function to get Ajax data?
load()
$.get()
$.post()
$.getJSON()
getAjax()
Answer
Correct Answer:
getAjax()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
135.
Which function can be used to prevent the default action of an event?
event.stopPropagation();
event.preventDefault();
event.off();
event.stopDefault();
Answer
Correct Answer:
event.preventDefault();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
136.
How to select all button elements in DOM?
$( ":button" )
$( ":allButtons" )
$( ":buttons" )
$( ":getButtons" )
Answer
Correct Answer:
$( ":button" )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
137.
Which of the following jQuery method retrieves all the elements contained in the jQuery set, as an array?
toArray()
toArrayObject()
changeToArray()
changeToArray()
Answer
Correct Answer:
toArray()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
138.
Which of the following jQuery method checks whether a supplied callback is in a list?
callbacks.hasCallback(foo)
callbacks.inList(foo)
callbacks.hasMethod(foo)
callbacks.has(foo)
Answer
Correct Answer:
callbacks.has(foo)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
139.
What does the :selected selector do?
Selects all elements that are visible.
Selects all input elements of type text.
Selects all elements that are selected.
None of the mentioned.
Answer
Correct Answer:
Selects all elements that are selected.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
140.
What does the method .empty() do?
Remove the set of matched elements from the DOM.
Remove all child nodes of the set of matched elements from the DOM.
Remove the set of matched elements from the DOM.
Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
Answer
Correct Answer:
Remove all child nodes of the set of matched elements from the DOM.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
141.
Which jQuery method should be used to deal with name conflicts?
nameConflict()
noConflict()
conflict()
noNameConflict()
Answer
Correct Answer:
noConflict()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
142.
$.extend(false, obj1, obj2, obj3); What does the above code do?
Extends the obj2 by merging obj1 and obj3 with obj2.
Extends the obj1 by merging obj2 and obj3 with obj1.
Extends the obj3 by merging obj2 and obj1 with obj3.
The statement is invalid because its arguments are invalid
Answer
Correct Answer:
Extends the obj1 by merging obj2 and obj3 with obj1.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
143.
Which of the following method returns all ancestor elements between a and a element?
$("span").parentsUntil("html");
$("span").parents();
Both 1 and 2
None of the mentioned
Answer
Correct Answer:
Both 1 and 2
Note: This Question is unanswered, help us to find answer for this one
Check Answer
144.
How jQuery hide() function works?
sets “visibility” inline style attribute of that element to “hidden”.
sets “display” inline style attribute of that element to “none”.
sets the horizontal attribute of that element to “-100px” off visible screen.
sets the vertical attribute of that element to “-100px” off visible screen.
Answer
Correct Answer:
sets “display” inline style attribute of that element to “none”.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
145.
Which of the following is not correct value for dataType when making Ajax request?
json
xml
sql
text
Note: This Question is unanswered, help us to find answer for this one
Check Answer
146.
What selector would you use to query for all elements with an ID that ends with a particular string, for example ‘txtTitle’ ?
$("[id$='txtTitle']")
$("[id='%txtTitle']")
$("[id='$txtTitle']")
None of the mentioned
Answer
Correct Answer:
$("[id$='txtTitle']")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
147.
What is the correct syntax to create a method in jQuery plugin? Assume that methodName is the name of the method and methodDefinition is the definition of the method.
jQuery.function.methodName = methodDefinition;
jQuery.fn.methodName = methodDefinition;
jQuery.fun.methodName = methodDefinition;
None of the mentioned
Answer
Correct Answer:
jQuery.fn.methodName = methodDefinition;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
148.
How basic authorization can be used with jQuery ajax request?`
$.ajax({ ... headers: { 'Authorization':'Basic xxxxxxxxxxxxx', }, ... });
$.ajax({ ... headers: { 'Basic' : 'xxxxxxxxxxxxx', }, ... });
$.ajax({ ... headers: { 'Basic-authorization':' xxxxxxxxxxxxx', }, ... });
$.ajax({ ... defineHeaders: { 'Authorization':'xxxxxxxxxxxxx', }, ... });
Answer
Correct Answer:
$.ajax({ ... headers: { 'Authorization':'Basic xxxxxxxxxxxxx', }, ... });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
149.
What is the most efficient way to load your code once DOM tree has loaded (without waiting for external resources)?
window.onload = function() { // your code here };
jQuery(document).onload(function() { / your code here });
jQuery(document).onready(function() { / your code here });
jQuery(document).ready(function() { / your code here });
Answer
Correct Answer:
jQuery(document).ready(function() { / your code here });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
150.
How to check which key was pressed using jQuery?
$('#selector').keypress(function (event) { $('#selector').alert((event.keyCode)); });
$('#selector').keypress(function (event) { alert(String.fromCharCode((event.keyCode))); });
$('#selector').keypress(function (event) { alert(fromCharCode((event.keyCode))); });
$('#selector').keypress(function (event) { alert(event.which); });
Answer
Correct Answer:
$('#selector').keypress(function (event) { alert(String.fromCharCode((event.keyCode))); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
151.
What does the event.stopPropagation() function does?
Bubbles up the DOM tree and stops at the closest parent element.
Bubbles up the DOM tree, preventing any parent handlers from being notified of the event.
Bubbles up the DOM and prevents other handlers on the same element from running.
None of the above
Answer
Correct Answer:
Bubbles up the DOM tree, preventing any parent handlers from being notified of the event.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
152.
Which of the following will stop user from writing into a text box?
$( "input[type=text]" ).focus(function() { $(this).blur(); });
$( "input[type=text]" ).focus(function() { $(this).end(); });
$( "input[type=text]" ).focus(function() { $(this).cancel(); });
$( "input[type=text]" ).focus(function() { $(this).stop(); });
Answer
Correct Answer:
$( "input[type=text]" ).focus(function() { $(this).blur(); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
153.
Which of the following code snippets can be used to get the ID of the element that fired an event?
a.event.target.id
b.$(this).attr('id')
c.this.id
d.$(event.target)[0].id
e.All of the above
Answer
Correct Answer:
e.All of the above
Note: This Question is unanswered, help us to find answer for this one
Check Answer
154.
Which of the following jQuery method adds the previous selection to the current selection?
add( selector )
andSelf( )
append(selector)
None of the above.
Answer
Correct Answer:
andSelf( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
155.
Which of the following is the best method for adding options to a select from a JSON object using jQuery?
selectValues = { "1": "test 1", "2": "test 2" }; for (key in selectValues) { if (typeof (selectValues[key] == 'string') { $('#mySelect').append('<option value="' + key + '">' + selectValues[key] + '</option>'); } }
$.each(selectValues, function(key, value) { $('#mySelect') .append($("<option></option>") .attr("value",key) .text(value)); });
$.each(selectValues, function(key, value) { $('#mySelect') .append($("<option>") .attr("value",key) .text(value)); });
$.each(selectValues, function(key, value) { $('#mySelect') .append($("<option>") .text(value)); });
Answer
Correct Answer:
$.each(selectValues, function(key, value) { $('#mySelect') .append($("<option></option>") .attr("value",key) .text(value)); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
156.
Which of the following is correct for selectors in jQuery?
A B Matches all elements with tag name A that are descendants of B A>B Matches all elements with tag name A that are direct children of B A-B Matches all elements with tag name A that are immediately preceded by sibling B A+B Matches all elements with tag name A preceded by any sibling B
A B Matches all elements with tag name A that are descendants of B A>B Matches all elements with tag name A that are direct children of B A+B Matches all elements with tag name A that are immediately preceded by sibling B A-B Matches all elements with tag name A preceded by any sibling B
A B Matches all elements with tag name A that are descendants of B A+B Matches all elements with tag name A that are direct children of B A>B Matches all elements with tag name A that are immediately preceded by sibling B A-B Matches all elements with tag name A preceded by any sibling B
Answer
Correct Answer:
A B Matches all elements with tag name A that are descendants of B A>B Matches all elements with tag name A that are direct children of B A+B Matches all elements with tag name A that are immediately preceded by sibling B A-B Matches all elements with tag name A preceded by any sibling B
Note: This Question is unanswered, help us to find answer for this one
Check Answer
157.
Which of the following is the correct way to get the value of a textbox using id in jQuery?
$(“.textbox”).text()
$(“#textbox”).val()
$(“.textbox”).val()
$(“#textbox”).text()
Answer
Correct Answer:
$(“#textbox”).val()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
158.
Consider the following code snippet:
<div id='id1'>
<div id='id2'>Div 2</div>
</div>
Which of the following tags is/are in the result of $('#id2').parents();?
html
head
body
html and body
head and body
Answer
Correct Answer:
html and body
Note: This Question is unanswered, help us to find answer for this one
Check Answer
159. Which of the following is the correct way to get <div> in the center of the screen using jQuery?
$(element).center();
$('your-selector').position({ of: $(window) });
$(element).align.center();
$(element).align.middle();
Answer
Correct Answer:
$('your-selector').position({ of: $(window) });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
160.
Which of the following is the correct way to move an element into another element?
$('#source').prependTo('#destination');
$("#source").add("#destination");
$("#source").html("#destination");
$("#source").add().html().("#destination");
Answer
Correct Answer:
$('#source').prependTo('#destination');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
161.
$('ul#myId > li'); What does the above statement return?
A set of tags whose id is "li".
A set of tags which contains class "li".
A set of li tags which are children of ul tags that have "myId" class.
A set of li tags which are children of ul tags that have "myId" id.
Answer
Correct Answer:
A set of li tags which are children of ul tags that have "myId" id.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
162.
Which of the following is the correct way to assign a selected value of a drop-down list using jQuery?
$("#myDDL").val(2);
$(".myDDL").children("option").val(2);
$(".myDDL").val('2');
$(".myDDL").children("option").innerText(‘2’);
Answer
Correct Answer:
$(".myDDL").val('2');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
163.
Which of the following is the correct way to select all elements whose id contains string "test" using jQuery?
$("[id*='test']")
$("[id^='test']")
$("id").filter("test")
$("id").find("test")
Answer
Correct Answer:
$("[id*='test']")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
164.
How can an Ajax request that has not yet received a response be canceled or aborted?
//xhr is an Ajax variable
Xhr .abort()
//xhr is an Ajax variable
Xhr .cancel()
//xhr is an Ajax variable
Xhr .die()
//xhr is an Ajax variable
Xhr .destroy()
Answer
Correct Answer:
//xhr is an Ajax variable
Xhr .abort()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
165.
Consider the following code snippet:
$(document).com(‘click’ , “ul.item” ,function (evt) {
Evt . preventDefault();
Console.log(this);
});
What will be returned to be console?
All ul elements that belong to the class, “item”
#document
All ul elements in the document
None of the above
Answer
Correct Answer:
All ul elements that belong to the class, “item” #document
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
166.
If jQuery is included before another library, how can conflict between jQuery and that library be avoided?
By calling jQuery.noConflict(); right after including jQuery.
By calling jQuery.useDefault = false; right after including jQuery.
By calling jQuery.useShortcut = false; right after including jQuery.
By using the jQuery object when working with the jQuery library and using the $ object for other libraries.
Answer
Correct Answer:
By using the jQuery object when working with the jQuery library and using the $ object for other libraries.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
167.
Consider the following code snippet:
$(‘#table1’).find( ‘tr’ ).hide().slice(10, 20).show();
What is the result of this code snippet?
Showing table1’s rows from 11th to 20th.
Showing table1’s 20 rows from 10th.
Deleting rows of table1 from 10th to 20th.
Deleting 20 rows of table1 from 10th onward.
Answer
Correct Answer:
Showing table1’s rows from 11th to 20th.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
168.
A <doctype> defines the document type of any XHTML document. It can be of three types:
Strict, Transitional, and Frameset
Strict, Transitional and Loose
Fixed, Intermediate and Loose
Fixed, Intermediate, Frameset
Answer
Correct Answer:
Strict, Transitional, and Frameset
Note: This Question is unanswered, help us to find answer for this one
Check Answer
169.
Which of the following function can be used to attach event handler to an element?
bind
attach
add
handle
Note: This Question is unanswered, help us to find answer for this one
Check Answer
170.
Consider the following code snippet:
$.map (array1, function1 );
Which of the following arguments is/are valid arguments of function1?
The index of the element to be translated in array1.
The item to be translated
function1 has no arguments.
Both the index of the element to be translated in array1 and the item to be translated
Answer
Correct Answer:
Both the index of the element to be translated in array1 and the item to be translated
Note: This Question is unanswered, help us to find answer for this one
Check Answer
171.
Which of the following is the correct way to do the following JavaScript Code with jQuery?
var d = document;
var odv = d.createElement ("div") ;
this. OuterDiv = odv;
var t = d.createElement ("table") ;
t.cellspacing = 0;
t.className = "text";
odv.appendChild(t) ;
this.$outerDiv = $ ( ' <div></div>' )
.hide()
.append ($ ('<table></table>')
.attr ({ cell spacing : 0 })
.addClass ( "text" )
var t = $ ( "<table cellspacing = '0' class= 'text'></table>" ) ;
$.append (t);
$ ( '<div/>' , {
text: 'Div text'
'class': 'className'
}) . appendTo ( '#parentDiv' );
var userInput = window.prompt (" please enter selector ") ;
$ (userInput) .hide ();
Answer
Correct Answer:
var t = $ ( "<table cellspacing = '0' class= 'text'></table>" ) ;
$.append (t);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
172.
$.grep (array1, function1);
The above statement _____ the elements of array1 array which satisfy function1 function.
sorts
updates
remove
finds
Note: This Question is unanswered, help us to find answer for this one
Check Answer
173.
Consider the following code snippet:
<font size=2>
<ul id='id1'>
<li id='li1'>Items 1</li>
<li id='li2'>Items 2</li>
<li id='li3'>Items 3</li>
</ul>
</font>
Which of the following code snippets return(s) a set of all li tags within "id1" except for li tag with id "li2"?
$('#id1 li').not($('#li2'));
$('#id1 li').except($('#li2'));
$('#id1 li').remove($('#li2'));
$('#id1 li').delete($('#li2'));
Answer
Correct Answer:
$('#id1 li').not($('#li2'));
Note: This Question is unanswered, help us to find answer for this one
Check Answer
174.
Which of the following is the correct way to select an option based on its text in jQuery?
$("#myselect option").filter(function(){ return $(this).text() == 'text';}).prop('selected', true);
$("#myselect option").prop('selected', true).text("text")
$("#myselect").filter("option").prop('selected', true).text("text");
$("#myselect").filter(function(){ return $(this).val() == 'text';}).prop('selected', true);
Answer
Correct Answer:
$("#myselect option").filter(function(){ return $(this).text() == 'text';}).prop('selected', true);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
175.
Which of the following is the correct way to check the existence of an element in jQuery other than the following code? if ($(selector).length>0) { // Do something }
jQuery.fn.exists = function(){return this.length>0;} if ($(selector).exists()) { // Do something }
jQuery.fn = function(){return this.length>0;} if ($(selector).exists()) { // Do something }
jQuery.exists = function(selector) {return ($(selector).length > 0);} if ($.exists(selector)) { }
jQuery.fn.exists = function(selector) { return selector ? this.find(selector).length : this.length; };
Answer
Correct Answer:
jQuery.fn.exists = function(){return this.length>0;} if ($(selector).exists()) { // Do something }
Note: This Question is unanswered, help us to find answer for this one
Check Answer
176.
What will be the message in the alert box?
<div class="selector">Text mates</div>
<div class="selector">Text mates2</div>
alert(jQuery('.selector').text().length);
10
NULL
21
Text mates Text mates2
Note: This Question is unanswered, help us to find answer for this one
Check Answer
177.
Which of the following is the correct way to get the value of a selected radio button from two radio buttons with jQuery?
$('input[name=radioName]:checked', '#myForm').val()
$("form:radio:checked").val();
$("input[name='radioName']:checked").val()
$("form:radio:button:checked").val();
Answer
Correct Answer:
$("input[name='radioName']:checked").val()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
178.
How can jQuery be used or optimized in such a way that the web applications can become richer and more functional?
var DED = (function() { var private_var; function private_method() { // do stuff here } return { method_1 : function() { // do stuff here }, method_2 : function() { // do stuff here } }; })();
// file: survey.js $(document).ready(function() { var jS = $('#surveycontainer'); var jB = $('#dimscreencontainer'); var d = new DimScreen({container: jB}); var s = new Survey({container: jS, DimScreen: d}); s.show(); });
Exc.ui.domTips = function (dom, tips) { this.dom = gift; this.tips = tips; this.internal = { widthEstimates: function (tips) { ... } formatTips: function () { ... } }; ... };
<script src="jquery/1.3.2/jquery.js" type="text/javascript"></script> <script type="text/javascript"> var AcmeJQ = jQuery.noConflict(true); var Acme = {fn: function(){}}; (function($){ Acme.sayHi = function() { console.log('Hello'); }; Acme.sayBye = function() { console.log('Good Bye'); }; })(AcmeJQ); </script>
Answer
Correct Answer:
<script src="jquery/1.3.2/jquery.js" type="text/javascript"></script> <script type="text/javascript"> var AcmeJQ = jQuery.noConflict(true); var Acme = {fn: function(){}}; (function($){ Acme.sayHi = function() { console.log('Hello'); }; Acme.sayBye = function() { console.log('Good Bye'); }; })(AcmeJQ); </script>
Note: This Question is unanswered, help us to find answer for this one
Check Answer
179.
The innerHeight function returns the inner height of an element, ___ the border and ___ the padding.
excludes, includes
excludes, excludes
includes, excludes
includes, includes
Answer
Correct Answer:
excludes, includes
Note: This Question is unanswered, help us to find answer for this one
Check Answer
180.
Which of the following will make the background of a page change, upon being refreshed?
$(document).ready(function() { var totalCount = 2; var num = Math.ceil( Math.random() * totalCount ); document.body.background = 'assets/background-'+num+'.jpg'; });
$(document).ready(function() { var num = Math.ceil( Math.random() * totalCount ); document.body.background = 'assets/background-'+num+'.jpg'; });
$(document).ready(function() { var totalCount = 2; var num = Math( Math.random() * totalCount ); document.body.background = 'assets/background-'+num+'.jpg'; });
$(document).ready(function() { var totalCount = 2; var num = Math.ceil( Math.random() * totalCount ); document.background = 'assets/background-'+num+'.jpg'; });
Answer
Correct Answer:
$(document).ready(function() { var totalCount = 2; var num = Math.ceil( Math.random() * totalCount ); document.body.background = 'assets/background-'+num+'.jpg'; });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
181.
How can an additional row be added to a table as the last row using jQuery?
$('#myTable tr:last').after('<tr>...</tr><tr>...</tr>');
add_new_row('#myTable','<tr><td>my new row</td></tr>');
$('#myTable > tbody:last').append('<tr>...</tr><tr>...</tr>');
$('#myTable tr:end').after('<tr>...</tr><tr>...</tr>');
Answer
Correct Answer:
$('#myTable > tbody:last').append('<tr>...</tr><tr>...</tr>');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
182.
Which of the following is the best way to open a jQuery UI dialog box without a title bar?
$("#ui- dialog-titlebar").hide();
$(".ui- dialog-titlebar").hide();
$("#dialog").siblings('div#ui-dialog-titlebar').remove();
$(".ui- titlebar").hide();
Answer
Correct Answer:
$(".ui- dialog-titlebar").hide();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
183.
Which option can be used to have jQuery wait for all images to load before executing something on a page?
All jQuery code need to add inside $function() { } syntax
With jQuery, can use $(document).ready() to execute something when the DOM is loaded and$(window).load() to execute something when all other things are loaded as well, such as the images.
With jQuery, can use $(document).ready() or $(window).load() syntax as these both are the same.
$(window).onLoad(function() { })
Answer
Correct Answer:
With jQuery, can use $(document).ready() to execute something when the DOM is loaded and$(window).load() to execute something when all other things are loaded as well, such as the images.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
184.
What is the result of NaN == NaN?
true
false
An error occurs.
None of these.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
185.
Which of the following is the correct way to select <a> on the basis of href using jQuery?
jQuery("a").href()
jQuery("a").attr("href")
jQuery("a[href='url']")
jQuery("a attr[href='url']")
Answer
Correct Answer:
jQuery("a attr[href='url']")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
186.
Whats the right way to access the contents of an iframe using jQuery?
If the <iframe> is from the same domain, the elements are easily accessible as $("#iFrame").contents().find("#someDiv").removeClass("hidden");
$('#frametest').HTML()
$('some selector', frames['nameOfMyIframe'].document).innerHTML()
All of Above
Answer
Correct Answer:
If the <iframe> is from the same domain, the elements are easily accessible as $("#iFrame").contents().find("#someDiv").removeClass("hidden");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
187.
Which of the following is the correct way to get HTML encoded value for any tag which function can be used?
function htmlEncode(value){ return $('<div/>').text(value).html(); }
function htmlEncode(value){ return $('<div/>').html(); }
function htmlEncode(value){ return $('<div/>').text(value).val(); }
function htmlEncode(value){ return $('<div/>').innerHTML(); }
Answer
Correct Answer:
function htmlEncode(value){ return $('<div/>').html(); }
Note: This Question is unanswered, help us to find answer for this one
Check Answer
188.
Using an element of some kind that is being hidden using .hide() and shown via .show(). Which of the following is the best way to determine if that element is currently hidden or visible on the screen?
$(element).is(":visible")
$(this).css("visibility") == "hidden"
$(element).is(":invisible")
$(this).css("visibile") == "hidden"
Answer
Correct Answer:
$(element).is(":visible")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
189.
Which of the following statements returns the number of matched elements of $('.class1')?
$('.class1').size();
count($('.class1'));
$('.class1').count;
None of these
Answer
Correct Answer:
$('.class1').size();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
190.
Consider the following code snippet:
<form id="form1">
<input type="text" id="text1" value="default" />
<input type="text" name="email" />
</form>
<script type="text/javascript">
function submitForm1() {
alert($('#form1').serialize());
}
</script>
What does the alert box display when the function submitForm1 is called?
email=
email=&text1=default
text1=&text2=
Nothing is shown in the alert box.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
191.
Which of the following is an example of a cross-browser compatible way of binding click events?
$(function() { $('#btnSave').click( function(){ //Additional code here }); });
$(function() { $('#btnSave').( function('click'){ //Additional code here }); });
$( { $('#btnSave').click( function(){ //Additional code here }); });
None of these.
Answer
Correct Answer:
None of these.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
192.
jQuery allows you to use ___ function to switch between showing and hiding an element.
show
hide
switch
toggle
Note: This Question is unanswered, help us to find answer for this one
Check Answer
193.
Consider the following code snippet:
$('a.arrow-1').click(function () {
$('.second-row').slideUp();
$(this).parent('.first-row').siblings('.second-row').slideDown();
});
The order of the animations of this code snippet are:
The targeted parent sibling .second-row will slide up, then .second-row will slide down.
.second-row will slide up, then the targeted parent sibling .second-row will slide down.
Both the targeted parent sibling .second-row will slide down and the .second-row will slide up actions will occur at the same time.
None of the above.
Answer
Correct Answer:
.second-row will slide up, then the targeted parent sibling .second-row will slide down.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
194.
Which of the following is the correct way to use jQuery with node.js?
By including jQuery library file
By installing jQuery npm module
By directly using jQuery without jQuery library file and jQuery npm module
By including jQuery library file and installing jQuery npm module
Answer
Correct Answer:
By including jQuery library file and installing jQuery npm module
Note: This Question is unanswered, help us to find answer for this one
Check Answer
195.
$.merge(array1, array2); The above function merges ___.
array1 into array2.
array2 into array1.
array1 with array2 and returns the result.
The statement is invalid. The correct one is array1.merge(array2);
Answer
Correct Answer:
array1 with array2 and returns the result.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
196.
Which of the following is the correct way to distinguish left and right mouse click event in jQuery?
event.what
event.which
event.click
event.whichclick
Answer
Correct Answer:
event.which
Note: This Question is unanswered, help us to find answer for this one
Check Answer
197.
Which of the following makes use of jQuery to select multiple elements?
$('table td').eq([0, 5, 9])
$('table td:eq(0), table td:eq(5), table td:eq(9)')
$('table td').eqAny([1, 5, 9]);
None of these.
Answer
Correct Answer:
$('table td:eq(0), table td:eq(5), table td:eq(9)')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
198.
What is the best approach to reset the entire form with JQuery?
$('input').val(‘’);
$('#myform')[0].reset(); //Where myform is page id
$(':input','#myform').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
$(":input").not(":button, :submit, :reset, :hidden").each( function() { this.value = this.defaultValue; });
Answer
Correct Answer:
$(":input").not(":button, :submit, :reset, :hidden").each( function() { this.value = this.defaultValue; });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
199.
Which of the following functions moves p tags that have para class to div with content id?
function moveElement() { $('p.para').each(function(index) { $(this).appendTo('#content'); }); }
function moveElement() { $('p.para').each(function(index) { $(this).append('#content'); }); }
function moveElement() { $('p.para').each(function(index) { $(this).insertAfter('#content'); }); }
function moveElement() { $('p.para').each(function(index) { $(this).after('#content'); }); }
Answer
Correct Answer:
function moveElement() { $('p.para').each(function(index) { $(this).appendTo('#content'); }); }
Note: This Question is unanswered, help us to find answer for this one
Check Answer
200.
Which of the following is correct with regards to how to upload a file asynchronously with jQuery?
In HTML5 file can be uploaded using Ajax and jQuery. Not only that, file validations(name,size,MIME-type) and handling the progress event can also be done with the HTML5 progress tag(or a div).
$('#one-specific-file').ajaxfileupload({ 'action': '/upload.php' });
Ajax file uploads cannot be done.
$(document).ready(function() { $("#uploadbutton").jsupload({ action: "addFile.do", onComplete: function(response){ alert( "server response: " + response); } });
Answer
Correct Answer:
In HTML5 file can be uploaded using Ajax and jQuery. Not only that, file validations(name,size,MIME-type) and handling the progress event can also be done with the HTML5 progress tag(or a div).
Note: This Question is unanswered, help us to find answer for this one
Check Answer
201.
Which of the following represents the best way to make a custom right-click menu using jQuery?
$(document).bind("contextmenu", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });
$(document).bind("contextrightmenu", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });
$(document).bind("rightclick", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });
None of the above.
Answer
Correct Answer:
$(document).bind("contextmenu", function(event) { event.preventDefault(); $("<div class='custom-menu'>Custom menu</div>") .appendTo("body") .css({top: event.pageY + "px", left: event.pageX + "px"}); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
202.
The css() function allows you to ___.
change the CSS class attribute.
change the CSS file path.
apply the CSS class to an element.
change the inline style attribute of an element.
Answer
Correct Answer:
change the inline style attribute of an element.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
203.
What is the difference between jQuery's .focusout() and .blur() events?
The .focusout() event is sent to an element when it, or any element inside of it, loses focus, while the .blur() event supports detecting the loss of focus from parent elements
The .blur() event is sent to an element when it, or any element inside of it, loses focus, while the .focusout() event supports detecting the loss of focus from parent elements.
There is no difference between the .focusout() and .blur() events; the two can be used interchangeably.
None of the above.
Answer
Correct Answer:
The .blur() event is sent to an element when it, or any element inside of it, loses focus, while the .focusout() event supports detecting the loss of focus from parent elements.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
204.
Which of the following is the correct way to check which key was pressed?
$('#txtValue').keypress(function(event){ $('#txtvalue'). alert( (event.keyCode) ); });
$('#txtValue').keypress(function(event){ alert( String.fromCharCode( (event.keyCode) ) ); });
$('#txtValue').keypress(function(event){ alert( fromCharCode( (event.keyCode) ) ); });
$('#txtValue').keypress(function(event){ alert( String.fromCharCode( (event) ) ); });
Answer
Correct Answer:
$('#txtValue').keypress(function(event){ alert( String.fromCharCode( (event.keyCode) ) ); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
205.
Consider the following code snippet:
$('#id1').animate({width:"240px"}, { queue:false, duration:1000 }).animate({height:"320px"}, "fast");
The order of the animations of this code snippet is ___.
First the width animation, then the height animation.
First the height animation, then the width animation.
Both the width animation and the height animation occur at the same time.
The order of animations is random.
Answer
Correct Answer:
Both the width animation and the height animation occur at the same time.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
206.
How or where can a plugin be declared, so that the plugin methods are available for the script?
In the head of the document, include the plugin after main jQuery source file, before the script file.
In the head of the document, include the plugin after all other script tags.
In the head of the document, include the plugin before all other script tags.
Anywhere in the document.
Answer
Correct Answer:
In the head of the document, include the plugin after main jQuery source file, before the script file.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
207.
What is the purpose of $(document).ready() function in Jquery?
To execute functions after all content and images are loaded
To execute functions after DOM is loaded
To execute functions before DOM load
To execute functions before content and images load
Answer
Correct Answer:
To execute functions after DOM is loaded
Note: This Question is unanswered, help us to find answer for this one
Check Answer
208.
How can the child img be selected inside the div with a selector?
jQuery(this).children("img");
jQuery(this).find("img");
$(this).find("img").attr("alt")
$(this).children("img").attr("alt")
Answer
Correct Answer:
jQuery(this).find("img");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
209.
Offset function gets the current offset of the first matched element in pixels relative to the ___.
document
parent element
children element
container
Answer
Correct Answer:
parent element
Note: This Question is unanswered, help us to find answer for this one
Check Answer
210.
Consider the following code snippet:
var message = 'Message';
$('#id1').bind('click', function() {
alert(message);
});
message = 'New message';
$('#id2').bind('click', function() {
alert(message);
});
What does the alert box display if "id1" is clicked?
Message
New message
Nothing
None of these
Answer
Correct Answer:
New message
Note: This Question is unanswered, help us to find answer for this one
Check Answer
211.
Consider the following code snippet:
$('#button1').bind('click', function(data) {...});
What is the data argument?
Click event's data
Function's data
Global variable
Local variable
Answer
Correct Answer:
Click event's data
Note: This Question is unanswered, help us to find answer for this one
Check Answer
212.
$('#a1').one('click', {times: 3}, function1); Which of the following is true for the above?
function1 will be executed once regardless of the number of times a1 is clicked.
function1 will be executed at most 3 times if a1 is clicked more than twice.
There is at most one instance of function1 to be executed at a time.
There are at most three instances of function1 to be executed at a time.
Answer
Correct Answer:
function1 will be executed once regardless of the number of times a1 is clicked.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
213.
Consider the following code snippet:
$(document).ready(function1);
$(document).ready(function2);
$(document).ready(function3);
Which of the following functions are executed when DOM is ready?
function1
function2
function3
function1, function2, and function3
No function is executed.
Answer
Correct Answer:
function1, function2, and function3
Note: This Question is unanswered, help us to find answer for this one
Check Answer
214.
Which of the following code snippets insert(s) the code snippet
at the end of div tags?
$('div').append('');
$('div').appendTo('');
$('').append('div');
$('').appendTo('div');
Answer
Correct Answer:
$('div').append(''); $('').appendTo('div');
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
215.
The position function gets the ___ positions of an element that are relative to its offset parent.
top and left
top and right
bottom and left
bottom and right
Answer
Correct Answer:
top and left
Note: This Question is unanswered, help us to find answer for this one
Check Answer
216.
Which of the following functions will return an empty set when end() function is chained right after that function?
add
children
filter
remove
Note: This Question is unanswered, help us to find answer for this one
Check Answer
217.
Consider the following code snippet:
$('#ul1 li').live('click', function1);
$('#ul1').after('<li id="lastLi">Last item</li>');
Is function1 executed if lastLi is clicked?
Yes
No
"lastLi" does not exist.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
218.
Which of the following is the correct use of ajaxStart() function?
The ajaxStart() function is used to start Ajax calls.
The ajaxStart() function is used to run some code when an Ajax call starts.
The ajaxStart() function is used to start Ajax calls and to run some code when an Ajax call starts.
None of these.
Answer
Correct Answer:
None of these.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
219.
Which of the following is the correct way to hide a menu div by clicking outside the menu div?
$('html').click(function() { //Hide the menus if visible }); $('#menucontainer').click(function(event){ event.stopPropagation(); });
$('#menucontainer').click(function(event) { $('body').one('click',function() { // Hide the menus }); event.stopPropagation(); });
$(document).click(function(event) { if($(event.target).parents().index($('#menucontainer')) == -1) { if($('#menucontainer').is(":visible")) { $('#menucontainer').hide() } } })
4 down vote $(document).click(function() { $(".overlay-window").hide(); }); $(".overlay-window").click(function() { return false; });
Answer
Correct Answer:
$('html').click(function() { //Hide the menus if visible }); $('#menucontainer').click(function(event){ event.stopPropagation(); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
220.
Which of the following is the correct way to manage a redirect request after a jQuery Ajax call?
$.ajax({ type: "POST", url: reqUrl, data: reqBody, dataType: "json", success: function(data, textStatus) { if (data.redirect) { // data.redirect contains the string URL to redirect to window.location.href = data.redirect; } else { // data.form contains the HTML for the replacement form $("#myform").replaceWith(data.form); } } });
public ActionResult Index(){ if (!HttpContext.User.Identity.IsAuthenticated) { HttpContext.Response.AddHeader("REQUIRES_AUTH","1"); } return View() }
$.ajax( error: function (jqXHR, timeout, message) { var contentType = jqXHR.getResponseHeader("Content-Type"); if (jqXHR.status === 200 && contentType.toLowerCase().indexOf("text/html") >= 0) { window.location.reload(); } });
$(document).ready(function () { $(document).ajaxSend( function(event,request,settings) { var intercepted_success = settings.success; settings.success = function( a, b, c ) { if( request.responseText.indexOf( "
Answer
Correct Answer:
$.ajax( error: function (jqXHR, timeout, message) { var contentType = jqXHR.getResponseHeader("Content-Type"); if (jqXHR.status === 200 && contentType.toLowerCase().indexOf("text/html") >= 0) { window.location.reload(); } });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
221.
Consider having multiple $(document).ready() functions in one or many linked JavaScript files. Given this information, which of the following will be executed?
first ready() function
last ready() function
All ready() functions
None of them
Answer
Correct Answer:
All ready() functions
Note: This Question is unanswered, help us to find answer for this one
Check Answer
222.
$('#id1').animate({width:"80%"}, "slow") The above code snippet will ___.
animate the tag with id1 from the current width to 80% width.
animate the tag with id1 from 80% width to current width.
animate the tag with id1 from the current 80% width to 0px.
animate the tag with id1 from 80% width to 100% width.
Answer
Correct Answer:
animate the tag with id1 from the current width to 80% width.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
223.
Which of the following is the correct way to get "Option B" with the value '2' from following HTML code in jQuery? <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select>
$("#list[value='2']").text();
$("#list option[value='2']").text();
$(this).find("option:selected").text();
element.options[element.selectedIndex].text
Answer
Correct Answer:
$("#list option[value='2']").text();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
224.
Which of the following methods can be used to utilize the animate function with the backgroundColor style property?
Use the jQuery UI library.
There is no need to do anything as jQuery core already supports that style property.
There is no way to use animate with that style property.
Answer
Correct Answer:
There is no way to use animate with that style property.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
225.
Which of the following functions is/are built-in jQuery regular expression function(s)?
test
match
find
jQuery does not have built-in regular expression functions.
Answer
Correct Answer:
jQuery does not have built-in regular expression functions.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
226.
each() is a generic ___ function.
comparator
operator
iterator
normal
Note: This Question is unanswered, help us to find answer for this one
Check Answer
227.
How can the href for a hyperlink be changed using jQuery?
$("a").link("http://www.google.com/");
$("a").change("href","http://www.google.com/");
$("a").link("href","http://www.google.com/");
$("a").attr("href", "http://www.google.com/");
Answer
Correct Answer:
$("a").attr("href", "http://www.google.com/");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
228.
Which of the following values is/are valid value(s) of secondArgument in addClass("turnRed", secondArgument); function, if the jQuery UI library is being used?
"fast"
slow
1000ms
3000
Note: This Question is unanswered, help us to find answer for this one
Check Answer
229.
jQuery allows simulating an event to execute an event handler as if that event has just occurred by using ___.
trigger function
execute function
intimate function
jQuery does not have this feature.
Answer
Correct Answer:
trigger function
Note: This Question is unanswered, help us to find answer for this one
Check Answer
230.
Which option is correct to use the below function to set cursor position for textarea? Function: $.fn.selectRange = function(start, end) { return this.each(function() { if (this.setSelectionRange) { this.focus(); this.setSelectionRange(start, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', start); range.select(); } }); };
$('#elem').selectRange(3,5);
$('#elem').selectRange(3 5);
$('#elem').selectRange(X:3,Y:5);
$('#elem').fn.selectRange(3,5);
Answer
Correct Answer:
$('#elem').selectRange(3,5);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
231.
The hide() function hides an element by ___.
setting "display" inline style attribute of that element to "none".
setting "visibility" inline style attribute of that element to "hidden".
setting the horizontal attribute of that element to "-100".
setting the vertical attribute of that element to "-100".
Answer
Correct Answer:
setting "display" inline style attribute of that element to "none".
Note: This Question is unanswered, help us to find answer for this one
Check Answer
232.
What does $('tr.rowClass:eq(1)'); return?
One element set which is the second row of the first table.
One element set which is the first row of the first table.
A set of tr tags which have "rowClass:eq(1)" class.
A set of tr tags which have "eq(1)" class.
Answer
Correct Answer:
One element set which is the second row of the first table.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
233.
Which of the following methods can be used to copy element?
clone
cloneTo
move
moveTo
Note: This Question is unanswered, help us to find answer for this one
Check Answer
234.
Which of the following events can be used to disable right click contextual menu?
contextmenu
contextualmenu
rightclickmenu
The right-click contextual menu cannot be disabled.
Answer
Correct Answer:
contextmenu
Note: This Question is unanswered, help us to find answer for this one
Check Answer
235.
Assuming that the jQuery UI library is used to make a list sortable, which of the following code snippets makes "list1" sortable?
$('#list1').sortable();
$('#list1').changeable();
$('#list1').interchangeable();
$('#list1').organizeable();
Answer
Correct Answer:
$('#list1').sortable();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
236.
Consider the following code snippet:
$(document).ready(function() {
$('div').each(function(index) {
alert(this);
});
});
Which of the following objects does the 'this' variable refer to?
window
document
The current div tag of the iteration.
The last element tag in the body.
Answer
Correct Answer:
The current div tag of the iteration.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
237.
Consider the following code snippet:
function function1() {
alert(arguments.length);
}
Which of the following is true when function1(); is run?
An error occurs because arguments variable is undefined.
An error occurs because you call function1 with no arguments.
The alert box displays "undefined".
The alert box displays 0.
Answer
Correct Answer:
The alert box displays 0.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
238.
One advantage of $.ajax function over $.get or $.post is that ___.
$.ajax offers error callback option.
$.ajax is easier to use.
$.ajax allows passing request parameters.
the result of $.ajax is formatted.
Answer
Correct Answer:
$.ajax offers error callback option.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
239.
What is the result of this function: jQuery.makeArray ( true )?
1
NaN
[ true ]
[]
Note: This Question is unanswered, help us to find answer for this one
Check Answer
240.
Which option is correct to perform a synchronous AJAX request?
beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); } }); }
beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: sync(true) }); }
beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: false }); }
jQuery only allow asynchronous AJAX request
Answer
Correct Answer:
beforecreate: function(node,targetNode,type,to) { jQuery.ajax({ url: 'http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function(result) { if(result.isOk == false) alert(result.message); }, async: false }); }
Note: This Question is unanswered, help us to find answer for this one
Check Answer
241.
Consider the following code snippet:
<ul id='id1'>
<li id='li1'>Items 1</li>
<li id='li2'>Items 2</li>
<li id='li3'>Items 3</li>
</ul>
Which of the following code snippets returns the same result as $('#id1 li').not($('#li2'));?
$('#li2').siblings();
$('#id2').siblings('#li2');
$('#li2').children();
$('#id2').children('#li2');
Answer
Correct Answer:
$('#li2').siblings();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
242.
Which of the following will select a particular option in a <select> element using its index?
$('select option[value="1"]')
$('select option:eq(1)')
$('select option:contains("Selection 1")')
All of the above.
Answer
Correct Answer:
$('select option:eq(1)')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
243. Consider the following code snippet:
$('#table1 tr:odd').addClass('oddRow');
$('#table1 tr:even').addClass('evenRow');
The result of the above code snippet is ___.
the odd rows of table1 have evenRow class, while the even rows have oddRow class
the odd rows of table1 have oddRow class, while the even rows have evenRow class
all rows of table1 have evenRow class
None of the above.
Answer
Correct Answer:
the odd rows of table1 have evenRow class, while the even rows have oddRow class
Note: This Question is unanswered, help us to find answer for this one
Check Answer
244. Is the following code snippet a valid ajax request? $.ajax({data: {'name': 'jQuery'},});
Yes.
No, because it does not have url.
No, because it does not have any argument after the comma.
No, because the function ajax does not exist in jQuery.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
245. Which of the following statements return(s) a set of p tags that contain "jQuery"?
$('p:contains(jQuery)');
$('p:contains("jQuery")');
$('p:has("jQuery")');
a and b
Note: This Question is unanswered, help us to find answer for this one
Check Answer
246. Which of the following statements return(s) a set of even rows?
$('tr').filter(':even');
$('tr:nth-child(even)');
$('tr:odd');
a and b
b and c
Note: This Question is unanswered, help us to find answer for this one
Check Answer
247. is() function ___ the current selection against an expression.
checks
finds
filters
gets
Note: This Question is unanswered, help us to find answer for this one
Check Answer
248. Which of the following gets the href attribute of "id1"?
$('#id1').attr('href');
$('#id1').getAttribute('href');
$('#id1')[0].attr('href');
Answer
Correct Answer:
$('#id1').attr('href');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
249. Which of the following values is/are valid value(s) of secondArgument in addClass('turnRed', secondArgument); function, if we use jQuery UI library?
'fast'
slow
1000ms
3000
Note: This Question is unanswered, help us to find answer for this one
Check Answer
250. What is the difference between $('p').insertBefore(arg1) and $('p').before(arg2) statement?
The former inserts p tags before the tags specified by arg1, the latter inserts content specified by arg2 before all p tags.
The former inserts content specified by arg1 before p tags, the latter inserts p tags before tags specified by arg2.
The former inserts arg1 inside p tags, the latter inserts p tags inside tags specified by arg2.
The former inserts p tags inside tags specified by arg1, the latter inserts arg2 inside p tags.
Answer
Correct Answer:
The former inserts p tags before the tags specified by arg1, the latter inserts content specified by arg2 before all p tags.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
251. Which of the following seems to be correct for ajaxStart(function()) method as shown in the below Code snippet? $("#div1").ajaxStart(function())
Method Attaches a function to be executed before an Ajax request is sent.
Method Attaches a function to be executed whenever an Ajax request completes successfully.
Method Attaches a function to be executed whenever an AJAX request begins and there is none already activated.
None of the above.
Answer
Correct Answer:
Method Attaches a function to be executed whenever an AJAX request begins and there is none already activated.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
252. Consider the following code snippet:
$('#ul1 li').live('click', function1);
$('#ul1').after('<li id="lastLi">Last item</li>');
Is live is deprecated in jQuery 1.3.2?
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
253. Which of the following methods can be used to utilize animate function with backgroundColor style property?
Use jQuery UI library.
There is no need to do anything as jquery core already supports that style property.
There's no way to use animate with that style property.
Answer
Correct Answer:
Use jQuery UI library.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
254. If you include jQuery after other library, how do you disable the use of $ as a shortcut for jQuery?
By calling jQuery.noConflict(); right after including jQuery.
By calling jQuery.useDefault = false; right after including jQuery.
By calling jQuery.useShortcut = false; right after including jQuery.
By calling jQuery.conflict = false; right after including jQuery.
Answer
Correct Answer:
By calling jQuery.noConflict(); right after including jQuery.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
255. Assume that you need to build a function that manipulates an image when the image is loaded. Which of the following functions should you use?
ready
load
change
focus
Note: This Question is unanswered, help us to find answer for this one
Check Answer
256. Which of the following commands creates a basic dialog containing this code snippet <div id="id1"> Simple dialog</div> using jQuery UI?
$("#id1").dialog();
$('#id1).showDialog();
$('#id1).widget();
$('#id1).showWidget();
Answer
Correct Answer:
$("#id1").dialog();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
257. What does $('tr:nth-child(4)') return?
A set of the fourth rows of the tables.
A set of the fifth rows of the tables.
A set of the fifth tr tags of the tables which have "nth-child(4)" class.
A set of the fifth tr tags of the tables which have "nth-child(4)" id.
Answer
Correct Answer:
A set of the fourth rows of the tables.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
258. Which of the following functions can be used to bind an event handler to display a message when the window is closed, reloaded or navigated to another page?
end
exit
unload
None of the above.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
259. Which of the following methods can be used to delete a specified tag?
remove.
delete.
truncate.
empty.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
260. $.grep(array1, function1); The above statement ___ the elements of array1 array which satisfy function1 function.
sorts
updates
removes
finds
Note: This Question is unanswered, help us to find answer for this one
Check Answer
261. Which of the following statements select(s) all option elements that are selected?
$(':selected');
$('select[selected]');
$('option:selected');
a and c
b and c
Note: This Question is unanswered, help us to find answer for this one
Check Answer
262. Which of the following arguments is/are (a) valid argument(s) of fadeIn function?
'slow'
1000ms
3000
a and b
a and c
Note: This Question is unanswered, help us to find answer for this one
Check Answer
263. The outer height is returned by outerHeight function including ___ and ___ by default.
border, padding
border, margin
margin, padding
None of the above.
Answer
Correct Answer:
border, padding
Note: This Question is unanswered, help us to find answer for this one
Check Answer
264. How or Where can we declare a plugin so that the plugin methods are available for our script?
Before the </body> tag of the document, include the plugin after main jQuery source file, before our script file.
Before the </body> tag of the document, include the plugin after all other script tags.
Before the </body> tag of the document, include the plugin before all other script tags.
Anywhere in the document.
Answer
Correct Answer:
Before the </body> tag of the document, include the plugin after main jQuery source file, before our script file.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
265. Which of the following statements uses a valid selector?
$('P');
$('#myId');
$('.myClass');
a, b and c
b and c
Answer
Correct Answer:
a, b and c
Note: This Question is unanswered, help us to find answer for this one
Check Answer
266. What is the result of the following code snippet? jQuery.unique([1, 2, 2, 3, 3, 1]);
[1, 2, 3].
[1, 2, 3, 1].
[1, 3, 2, 1, 2, 3].
[1, 1, 2, 2, 3, 3].
None of the a
Answer
Correct Answer:
None of the a
Note: This Question is unanswered, help us to find answer for this one
Check Answer
267. Consider the following code snippet:
$('#div1').html($('#div1').html().replace(/bad/, " "));
Which of the following is the result of this code snippet?
Replacing "bad" word in the inner html of div1.
Removing any word containing "bad" in the inner html of div1.
Appending an inner html of div1 which removes "bad" word to div1's inner html.
Appending an inner html of div1 which removes any word containing "bad" to div1's inner html.
Answer
Correct Answer:
Replacing "bad" word in the inner html of div1.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
268. Which of the following methods can be used to load data?
getJSON.
get.
ajaxSend.
ajaxStart.
Answer
Correct Answer:
getJSON. get.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Check Answer
269. Which of the following statements returns all https anchor links?
$('a[href^=https]');
$('a[href$=https]');
$('a[href=https]');
$('a[href]=https');
Answer
Correct Answer:
$('a[href^=https]');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
270. Read the following JavaScript code snippet:
$('div#id1').bind('click.divClick', function () {alert('A div was clicked');});
What is divClick in the code snippet?
An event type.
An event function.
A div class.
A namespace.
Answer
Correct Answer:
A namespace.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
271. Consider the following code snippet:
$('#table1').find('tr').filter(function(index) { return index % 3 == 0}).addClass('firstRowClass');
The result of the above code snippet is ___.
the rows of table1 at order 3n + 1 (n = 0, 1, 2,...) have class firstRowClass
the rows of table1 at order 3n (n = 1, 2,...) have class firstRowClass
all rows of table1 have class firstRowClass
no row of table1 has class firstRowClass
Answer
Correct Answer:
the rows of table1 at order 3n + 1 (n = 0, 1, 2,...) have class firstRowClass
Note: This Question is unanswered, help us to find answer for this one
Check Answer
272. The css() function allows you to ___.
change the CSS class attribute.
change the CSS file path.
change the inline style attribute of an element.
Answer
Correct Answer:
change the inline style attribute of an element.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
273. Which of the following values is/are valid value(s) of secondArgument in addClass("turnRed", secondArgument); function, if the jQuery UI library is being used?
slow
1000ms
3000
Note: This Question is unanswered, help us to find answer for this one
Check Answer
274. The height function returns the height of an element in ___.
pixel units
point units
em units
millimeter units
Answer
Correct Answer:
pixel units
Note: This Question is unanswered, help us to find answer for this one
Check Answer
275. Consider the following code snippet: Items 1 Items 2 Items 3 Which of the following code snippets return(s) a set of all li tags within id1 except for the li tag with id li2?
$('#id1 li').not ($('#li2'));
$('#id1 li').except($('#li2'))
$('#id1 li').remove($('#li2'));
$('#id1 li').delete($('#li2'));
Answer
Correct Answer:
$('#id1 li').not ($('#li2'));
Note: This Question is unanswered, help us to find answer for this one
Check Answer
276. What is true of the following code? $(' ', { src: 'images/little.bear.png', alt: 'Little Bear', title:'I woof in your general direction', click: function(){ alert($(this).attr('title')); } })
It will alert the value of title attribute of the image being clicked
It will alert the name of the element being clicked
It will alert "title"
It will alert attribute title
Answer
Correct Answer:
It will alert the value of title attribute of the image being clicked
Note: This Question is unanswered, help us to find answer for this one
Check Answer
277. Which is correct syntax for creating new html element?
$(
$(
)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
278. Which protocol should you use when referencing a CDN script in a web page?
Always use https so that it works with secure pages
Let the browser figure out the protocol by using //
Always use http
None of the above
Answer
Correct Answer:
Let the browser figure out the protocol by using //
Note: This Question is unanswered, help us to find answer for this one
Check Answer
279. How do we check if a selector matches something in jQuery?
jQuery("foo").length > 0
jQuery("foo") > 0
jQuery("foo").hasNodes()
jQuery("foo") !== false
jQuery("foo").exists()
Answer
Correct Answer:
jQuery("foo").length > 0
Note: This Question is unanswered, help us to find answer for this one
Check Answer
280. Hello $('p').prepend('world '); $('p').append('.'); p = ?
world Hello.
Helloworld .
.world Hello
Answer
Correct Answer:
world Hello.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
281. Which of the following callback functions provides the most flexibility?
$.ajax()
$.load()
$.post()
$.get()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
282. True or False :jQuery method dequeue() used while creating animation effects removes all remaining queued functions from the selected elements
True
False
Note: This Question is unanswered, help us to find answer for this one
Check Answer
283. Assuming there are p tags on a page, what will be the result of the code below: $(function(){ $("p").hide("slow").show(); });
The opacity of all the p tags will be set to 0
The p tags will be hidden.
The p tags will collapse slowly and then appear.
A JavaScript error will occur.
Answer
Correct Answer:
The p tags will be hidden.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
284. which property in the event object can be used to get the key code of a key press event
event.keyCode
event.which
event.key
event.type
Answer
Correct Answer:
event.which
Note: This Question is unanswered, help us to find answer for this one
Check Answer
285. We can delay execution of .css() with .delay()
true
false
Note: This Question is unanswered, help us to find answer for this one
Check Answer
286. You can animate 'color' and 'background-color' properties.
False
True
Note: This Question is unanswered, help us to find answer for this one
Check Answer
287. True or false: The .blur() function can be bound to a form element to detect when a child element loses focus.
True
False
Note: This Question is unanswered, help us to find answer for this one
Check Answer
288. How can you add your own custom selectors to jQuery?
$.extend($.expr[':'], { name : function }); or $.expr[':'].name = function(){}
$.extend($.expression[':'], { name : function } or $.expression[':'].name = function(){}
You can not extend the selector engine, you have to create your own filter
Answer
Correct Answer:
$.extend($.expr[':'], { name : function }); or $.expr[':'].name = function(){}
Note: This Question is unanswered, help us to find answer for this one
Check Answer
289. What selector engine does jQuery use
Bouncer
CssQuery
getElementsBySelector
jSelect
Sizzle
Note: This Question is unanswered, help us to find answer for this one
Check Answer
290. Which of these is NOT a valid way to initiate the document.ready call?
$(function() { /* Stuff here */ });
jQuery(document).ready(function($) { /* Stuff here */ })(jQuery);
(function(x) { x(function() { /* Stuff here */ }); })(jQuery);
$(document).ready(function() { /* Stuff here */ });
Answer
Correct Answer:
jQuery(document).ready(function($) { /* Stuff here */ })(jQuery);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
291. What do you use jQuery.noConflict() for?
to prevent other libraries from stealing the '$' function.
to make jQuery's $ function accessible by other libraries
To only have one javascript library on a page.
to restore the '$' to its previous owner.
Answer
Correct Answer:
to restore the '$' to its previous owner.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
292. What does the following code do? $(document).ready(function(){ $(document).bind("contextmenu",function(e){ return false; }); });
It opens the contextmenu when the page loads
It disables the menu when you right click
It opens the contextmenu when you left click
It disables all options in the contextmenu
Answer
Correct Answer:
It disables the menu when you right click
Note: This Question is unanswered, help us to find answer for this one
Check Answer
293. Attribute Contains Prefix Selector is:
[name+="value"]
[name$="value"]
[name|="value"]
[name*="value"]
[name~="value"]
Answer
Correct Answer:
[name|="value"]
Note: This Question is unanswered, help us to find answer for this one
Check Answer
294. What does the following return? $.inArray("foo", ["foo", "bar"]);
0
true
TRUE
1
Note: This Question is unanswered, help us to find answer for this one
Check Answer
295. What does .delegate() allow you do, that .live() does not?
Instantiate event listeners before the document is ready.
Capture events that are fired from parent DOM elements.
Override existing event listeners.
Attach the event handler to any DOM element.
Answer
Correct Answer:
Attach the event handler to any DOM element.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
296. Which jQuery method animates the height of matched elements?
.slideHeight()
None of these
.height()
.slideToggle()
All of these
Answer
Correct Answer:
.slideToggle()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
297. In what scenario will the alert box show? $(function(){ if(!$("p")) alert("hello"); });
It will never show.
When there are p tags on the page
When there is more than one p tag on the page
When there are no p tags on the page
Answer
Correct Answer:
It will never show.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
298. Which of the following will get the current coordinates (of the first element in the jQuery collection) relative to the offset parent?
position()
relOffset()
offset()
relativePosition()
Answer
Correct Answer:
position()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
299. Which of the following syntaxes are equivalent to $(document).ready(handler)?
.load()
$(handler)
.ready()
All of these
Answer
Correct Answer:
$(handler)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
300. What does this do? $("p").find("span").end().css("border", "2px red solid");
Selects all spans, then apply CSS rule.
Selects all paragraphs, finds span elements inside these, go to the end of each paragraph, then apply CSS rule.
Selects all paragraphs, apply CSS rule, then reverts the selection back to the spans.
Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs, then apply CSS rule.
Answer
Correct Answer:
Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs, then apply CSS rule.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
301. Which is not a type of selector?
CSS selector
Custom Selector
XPath Selector
Javascript Selector
Answer
Correct Answer:
Javascript Selector
Note: This Question is unanswered, help us to find answer for this one
Check Answer
302. What will be the value of 'display' css property of the following tag? $('span').hide(); $('span').show();
inline
inline-block
block
inherit
It will vary depending the value of the span's initial display property
Answer
Correct Answer:
It will vary depending the value of the span's initial display property
Note: This Question is unanswered, help us to find answer for this one
Check Answer
303. Event delegation:
Does not let you pause or delay the propagation of events
Is a technique that lets you separate event-handling code from other code
Allows you to trigger events on related DOM elements simultaneously
Allows you to register handlers before elements are added to the page
Answer
Correct Answer:
Allows you to register handlers before elements are added to the page
Note: This Question is unanswered, help us to find answer for this one
Check Answer
304. What is an event handler?
A function that executes your code before the event occurs.
A function that executes your code as the event occurs.
A function that executes your code after the event occurs.
A function that occurs during and after the event is executed.
Answer
Correct Answer:
A function that executes your code after the event occurs.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
305. What index value does the :nth-child() selector starts with?
0
1
2
Note: This Question is unanswered, help us to find answer for this one
Check Answer
306. True or False: .position() accepts an optional argument as a selector
true
false
Note: This Question is unanswered, help us to find answer for this one
Check Answer
307. Which code selects the first article from the news.html page, assuming every article is enclosed in <article> tags.
$("#target").load("/news.html article:eq(1)");
$("#target").ajax("/news.html article:get(0)");
$("#target").load("/news.html article:get(1)");
$("#target").ajax("/news.html article:eq(0)");
$("#target").load("/news.html article:eq(0)");
Answer
Correct Answer:
$("#target").load("/news.html article:eq(0)");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
308. How do you get the value of the selected radio button in a group of radio buttons with the name of 'radioName'?
None of these
$('input[name=radioName]:first').val()
$('input[name=radioName]:checked', '#myForm').val()
$('#myForm', 'input[name=radioName]').is('checked').val()
Answer
Correct Answer:
$('input[name=radioName]:checked', '#myForm').val()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
309. What is the difference between $('#element').remove() and $('#element').detach()
remove() removes the element from the DOM, while detach() only removes jQuery data.
remove() removes the element from the DOM along with any jQuery data, while detach() only removes the element from the DOM.
detach() removes the element along with all the jQuery data, whereas remove() only removes it from the DOM.
detach() removes the element from the DOM, while remove() only removes jQuery data.
Answer
Correct Answer:
remove() removes the element from the DOM along with any jQuery data, while detach() only removes the element from the DOM.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
310. What does this return: $(".class").attr("id");
The value of the 'id' attribute for all the elements in the set of matched elements
The value of the 'class' attribute for the first element in the set of matched elements
Nothing
The value of the 'id' attribute for the first element in the set of matched elements
Answer
Correct Answer:
The value of the 'id' attribute for the first element in the set of matched elements
Note: This Question is unanswered, help us to find answer for this one
Check Answer
311. $(".clicker").click(function() { $('link[rel=stylesheet]').attr('href' , $(this).attr('rel')); }); The above is used to do what?
Adds the contents of another stylesheet to the currently loaded one upon clicking the element with class "clicker"
Nothing, it returns a console.log error
Change the stylesheet loaded in the page upon clicking the element with class "clicker"
Reload the currently selected stylesheet upon clicking the element with class "clicker"
Answer
Correct Answer:
Change the stylesheet loaded in the page upon clicking the element with class "clicker"
Note: This Question is unanswered, help us to find answer for this one
Check Answer
312. What does the serialize() method do: $('#myForm').serialize();
fetches the names and values in all input fields, and returns them as an object.
fetches the code and makes it numeric.
fetches the names and values of all the input fields contained in the form, and generates a URL encoded string representation
fetches the names and values in all input fields and creates a JSON representation of the form
Answer
Correct Answer:
fetches the names and values of all the input fields contained in the form, and generates a URL encoded string representation
Note: This Question is unanswered, help us to find answer for this one
Check Answer
313. How can you get the number of paragraphs in the html document using jQuery?
count($('p'))
$('p').length()
$('p').count()
$('p').count
$('p').length
Answer
Correct Answer:
$('p').length
Note: This Question is unanswered, help us to find answer for this one
Check Answer
314. Which can be used to detect broken images?
$("img").error(callbackFunction)
image.error()
$("img").isBroken()
image.elements()
$("img").error()
Answer
Correct Answer:
$("img").error(callbackFunction)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
315. Which custom selector is case sensitive?
:custom()
:case()
:includes()
medium
:contains()
Answer
Correct Answer:
:contains()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
316. What is the name of a function that intercepts combinations of user actions?
user function
user generated event
compound event handler
medium
combo function
Answer
Correct Answer:
compound event handler
Note: This Question is unanswered, help us to find answer for this one
Check Answer
317. What method allows us to remove values that were previously set using jQuery.data()?
.data().remove()
.dequeue()
.removeData()
.clearQueue()
Answer
Correct Answer:
.removeData()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
318. What will this function do? $(function(){ $(window).setInterval(function(){ $('b'++'ody').append('1')}, 1000); });
It won't do anything because the is not selected.
It will add a 1 to the document body every second.
It will add a 1 to every element starting with b and ending with ody.
Answer
Correct Answer:
It will add a 1 to the document body every second.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
319. Which will get the CURRENT COORDINATES of the first element in the set of matched elements, RELATIVE TO THE DOCUMENT?
pos()
coord()
offset()
position()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
320. Which of the following selectors is NOT equivalent to the others?
:first
:nth-child(1)
:first-child
Note: This Question is unanswered, help us to find answer for this one
Check Answer
321. Two
One
Five
Given the above HTML What would the output of the following code be? var myDivText = $('#MyDiv').text() console.log(myDivText)
Five
Two
One
Undefined
Null
Note: This Question is unanswered, help us to find answer for this one
Check Answer
322. How do I pull a native DOM element from a jQuery object?
$("#foo[0]");
$( "#foo" ).find(native[ 0 ]);
$( "#foo" ).get(native[ 0 ]);
$( "#foo" ).get( 0 );
Answer
Correct Answer:
$( "#foo" ).get( 0 );
Note: This Question is unanswered, help us to find answer for this one
Check Answer
323. Which of the following is NOT a custom jQuery form selector?
:checkbox
:form
:selected
:enabled
Note: This Question is unanswered, help us to find answer for this one
Check Answer
324. What does the filter() method do in this: $('div').filter('.nav')
it sifts through all divs and leaves only those contained within a .nav element
The filter funtion is run when the DOM is initialized
it filters all the ('.nav') and leaves only the divs
it sifts through all the divs and leaves only those with the nav class
Answer
Correct Answer:
it sifts through all the divs and leaves only those with the nav class
Note: This Question is unanswered, help us to find answer for this one
Check Answer
325. What does the following code do? $(".foobar").find(".foo").fadeOut();
Fade out of all children of elements matching ".foobar"
Fade out of elements matching ".foobar"
Fade out of elements matching ".foo" that are descendants of elements matching ".foobar"
Fade out of all descendants of elements matching ".foo" inside those matching ".foobar"
Answer
Correct Answer:
Fade out of elements matching ".foo" that are descendants of elements matching ".foobar"
Note: This Question is unanswered, help us to find answer for this one
Check Answer
326. By default, the outerWidth(true) function returns the width of the element including
margin,border and padding
border and padding
margin and padding
margin and border
Answer
Correct Answer:
margin,border and padding
Note: This Question is unanswered, help us to find answer for this one
Check Answer
327. var result = $("#div").css("color","red") What does the "result" var contain?
True
False
CSS property
jQuery object
Answer
Correct Answer:
jQuery object
Note: This Question is unanswered, help us to find answer for this one
Check Answer
328. Which of these is NOT a pseudoclass?
:next
:first
:before
:last
:after
Note: This Question is unanswered, help us to find answer for this one
Check Answer
329. Given the following HTML code snippet: How would you get a collection of all the items inside the "wrapper"?
$('#wrapper').contents();
$('#wrapper').html();
$('#wrapper').find("all");
$('#wrapper').children();
Answer
Correct Answer:
$('#wrapper').children();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
330. The "complete" callback in a jQuery AJAX request, is called only after...
the AJAX request is failed
if there is no "success" callback defined in the AJAX request
the AJAX request finishes, irrespective of error or success
the AJAX request is successful without any errors
Answer
Correct Answer:
the AJAX request finishes, irrespective of error or success
Note: This Question is unanswered, help us to find answer for this one
Check Answer
331. True or False? jQuery UI is part of jQuery.
True
False
Note: This Question is unanswered, help us to find answer for this one
Check Answer
332. What element type can you apply the "jQuery.unique(...)" on?
Arrays of DOM elements
Arrays of characters
Arrays of numbers
Arrays of strings
Answer
Correct Answer:
Arrays of DOM elements
Note: This Question is unanswered, help us to find answer for this one
Check Answer
333. how do you select the content document of an iframe on the same domain jQuery
.filter()
.children()
.contents()
.find()
Answer
Correct Answer:
.contents()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
334. How to set default options for all future AJAX requests?
.ajaxSend()
.ajaxStart()
jQuery.ajaxSetup( options )
jQuery.ajax()
Answer
Correct Answer:
jQuery.ajaxSetup( options )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
335. What keyword can be used to refer to the element that triggered the event (in the event handler callback)?
that
element
event
this
e
Note: This Question is unanswered, help us to find answer for this one
Check Answer
336. What method checks for the presence of a class before applying or removing it?
.apply_remove()
.toggleClass()
.checkFunction()
medium
.checkPresence()
Answer
Correct Answer:
.toggleClass()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
337. Which jQuery method can be used to bind both the mouseover and the mouseout events?
mouse()
switch()
hover()
toggle()
change()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
338. When an event is triggered on an element, the same event is also triggered on all of that element’s ancestors. What is the name of this process?
global event
event bubbling
upward progress
medium
progressive enhancement
Answer
Correct Answer:
event bubbling
Note: This Question is unanswered, help us to find answer for this one
Check Answer
339. Which function locates elements at the same level as the current selection?
.find()
.closest()
.children()
.siblings()
Answer
Correct Answer:
.siblings()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
340. What term refers to the acceleration and deceleration that occurs during an animation?
speeding
velocity
gradient
resizing
easing
Note: This Question is unanswered, help us to find answer for this one
Check Answer
341. How to Remove from the queue all items that have not yet been run in jquery?
clearQueue()
hide()
dequeue()
queue()
Answer
Correct Answer:
clearQueue()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
342. Why do we add the stop() function before the animate() function?
stop() halts the execution of the scripts on the page until any animations have finished.
stop() ends any currently running animations on the element.
to stop the animation after it has finished.
to tell jQuery that the animation has to be stopped at some point.
Answer
Correct Answer:
stop() ends any currently running animations on the element.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
343. The insertAfter function adds a new element as a sibling. What comparable function adds a new element as a child?
appendTo
createChild
insertNew
addChild
expandFamily
Note: This Question is unanswered, help us to find answer for this one
Check Answer
344. Which one will be found faster?
$('div.element')
$('.element')
$('#element')
$('div#element')
Answer
Correct Answer:
$('#element')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
345. What is not a an AjaxEvent.
.ajaxComplete()
.ajaxSend()
.ajaxError()
.ajaxRun()
.ajaxStop()
Answer
Correct Answer:
.ajaxRun()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
346. What method returns control of the $ identifier to other libraries?
.noConflict()
medium
.$()
.library()
.return()
Answer
Correct Answer:
.noConflict()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
347. Which of the following jQuery functions are deprecated?
.die()
.browser()
.live()
.sub()
All of these
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Check Answer
348. Which term is given to the jQuery feature that allows the attachment of one function to another?
outer join
stringing
concatenation
chaining
Note: This Question is unanswered, help us to find answer for this one
Check Answer
349. What method selects the sibling element that immediately follows the current one?
next()
next_element()
medium
next_sibling()
sibling()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
350. What is the difference between remove() & empty()
remove() method removes the selected element(s) and its child elements whereas empty() method removes the child elements of the selected element(s)
they are same
remove() method removes the child elements of the selected element(s) whereas empty() method removes the selected element(s) and its child elements
Answer
Correct Answer:
remove() method removes the selected element(s) and its child elements whereas empty() method removes the child elements of the selected element(s)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
351. What does $('#myDiv').load('page.html') do?
It adds the string 'page.html' as the contents of the #myDiv div.
it loads the #myDiv on the contents of the 'page.html' browser
it fires an AJAX request, fetches the result of page.html as text, and inserts it into the div
Answer
Correct Answer:
it fires an AJAX request, fetches the result of page.html as text, and inserts it into the div
Note: This Question is unanswered, help us to find answer for this one
Check Answer
352. You can copy an element by calling which of the following methods?
cloneTo()
clone()
copy()
moveTo()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
353. What does the greater sign (>) indicate in the following code? $('#summary > div').hide();
hierarchical relationship
comparison operator
child selector
directional indicator
chaining
Answer
Correct Answer:
child selector
Note: This Question is unanswered, help us to find answer for this one
Check Answer
354. Which part of the following statement is the action? $('p').css('color','blue');
'color'
.css
$('p')
'blue'
Note: This Question is unanswered, help us to find answer for this one
Check Answer
355. True or false? The jQuery library can be used to request a server-side script.
False
True
Note: This Question is unanswered, help us to find answer for this one
Check Answer
356. How should your JQuery code be wrapped so it executes only once the page has loaded?
$(document).pageloadcomplete(function () { /* Code goes here */ });
document.ready(function () { /* Code goes here */ });
$(document).ready(function () { /* Code goes here */ });
$(document).ready(function { /* Code goes here */ });
$(document).ready({ /* Code goes here */ });
Answer
Correct Answer:
$(document).ready(function () { /* Code goes here */ });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
357. What jQuery function is used to set an element's markup content?
document.write()
echo()
.content()
.html()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
358. If you want to change the text displayed in a paragraph by adding text before what's currently displayed, which would be correct?
$('p').append('text to add');
$('p').content('text to add');
$('p').text('text to add');
$('p').html('text to add');
$('p').prepend('text to add');
Answer
Correct Answer:
$('p').prepend('text to add');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
359. When using jQuery animation, you can specify duration in the following format:
500
All of these
Leave it blank
'fast'
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Check Answer
360. What does the animate method do?
Allows you to animate any CSS property controlled by an alphabetic value
Allows you to animate CSS property controlled by a numeric value
Allows you to create a cartoon using the DOM
Answer
Correct Answer:
Allows you to animate CSS property controlled by a numeric value
Note: This Question is unanswered, help us to find answer for this one
Check Answer
361. What jQuery function is used to add HTML content just outside of a selection?
after()
more()
later()
outside()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
362. What does the following code do? $('#mydiv').wrap('
');
duplicate the element id 'mydiv'
Create a parent 'div' tag for element id 'mydiv'.
Create a div next to the element id 'mydiv'
Answer
Correct Answer:
Create a parent 'div' tag for element id 'mydiv'.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
363. Which of the following is used to schedule a function to execute after an animation has completed?
graceful degradation
progressive enhancement
callback function
chaining
AJAX
Answer
Correct Answer:
callback function
Note: This Question is unanswered, help us to find answer for this one
Check Answer
364. What does the $.get() jQuery function do?
It returns the DOM elements that are contained in the jQuery object.
It returns an object
It fires a GET OBJECT request
It fires a GET AJAX request
Answer
Correct Answer:
It fires a GET AJAX request
Note: This Question is unanswered, help us to find answer for this one
Check Answer
365. Which selector will only return one element?
:one-based()
:even
:odd
:nth-child()
Answer
Correct Answer:
:nth-child()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
366. Which method is used to bind an event handler to existing and future matching elements?
attach();
click();
.on();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
367. How do you execute code 2 seconds after the page was loaded.
window.setTimeout(function(){ // some code }, 2);
window.delayed(function(){ // some code }, 2000);
window.timeOut(function(){ // some code }, 2);
window.setTimeout(function(){ // some code }, 2000);
Answer
Correct Answer:
window.setTimeout(function(){ // some code }, 2000);
Note: This Question is unanswered, help us to find answer for this one
Check Answer
368. What method is used to set one or more style properties for selected elements?
style()
css()
javascript()
html()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
369. How do you pass options to a plugin?
$("...").foobar( option1: 123, option2: 9 );
$("...").foobar({ option1: 123, option2: 9 });
$("...").foobar([ option1: 123, option2: 9 ]);
Answer
Correct Answer:
$("...").foobar({ option1: 123, option2: 9 });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
370. What character is used to identify a child combinator relationship?
left carat (<)
minus (-)
right carat (>)
medium
plus (+)
Answer
Correct Answer:
right carat (>)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
371. How would you prevent the default browser action from an event handler without affecting other properties of the event flow?
$a.click(function (e) { /* code */ e.returnValue = false; });
$a.click(false);
$a.click(function (e) { /* code */ e.preventDefault(); });
$a.click(function () { /* code */ return false; });
Answer
Correct Answer:
$a.click(function (e) { /* code */ e.preventDefault(); });
Note: This Question is unanswered, help us to find answer for this one
Check Answer
372. Which of the following is a subset of jQuery's CSS selectors?
universal selectors
All of these choices are subsets
attribute selectors
child selectors
css3 selectors
Answer
Correct Answer:
All of these choices are subsets
Note: This Question is unanswered, help us to find answer for this one
Check Answer
373. Which statement best described the code snippet: $('#myID').animate({width:'90''fast'
Animate the tag with myID from the current width to 90% width.
Animate the tag with myID from 90% width to 0% width.
Animate the tag with myID from 90% width to 100% width.
Animate the tag with myID from 90% width to the current width.
Answer
Correct Answer:
Animate the tag with myID from the current width to 90% width.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
374. Which of the following selectors is the fastest?
$('.grid12');
$('div+.grid12');
$('#container+div');
$('div');
$('#container');
Answer
Correct Answer:
$('#container');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
375. To dynamically set the src attribute of all img elements use:
$(img).setAttribute('src', 'photo.jpg');
$('img').attr('src', 'photo.jpg');
$('img src').set('photo.jpg');
$('img').attr('src').set('photo.jpg');
Answer
Correct Answer:
$('img').attr('src', 'photo.jpg');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
376. True or False? live() method has been removed from version 1.9
False
True
Note: This Question is unanswered, help us to find answer for this one
Check Answer
377. Is this a valid statement in jQuery? $("#foo").hide().show().css("color", "red").fadeOut();
Yes
No
Note: This Question is unanswered, help us to find answer for this one
Check Answer
378. In the following statement, which is the selector? $('p').css('color','blue');
blue
p
.css
color
Note: This Question is unanswered, help us to find answer for this one
Check Answer
379. how do you assign php value in jquery variable?
var member= "<?php echo $member_value; ?>";
var member= <?php $member_value; ?>;
Answer
Correct Answer:
var member= "<?php echo $member_value; ?>";
Note: This Question is unanswered, help us to find answer for this one
Check Answer
380. True or False : It is possible to use relative values for jQuery animate() method.
False
True
Note: This Question is unanswered, help us to find answer for this one
Check Answer
381. Which of the following is NOT a valid example of a selector filter?
div:left
li:last
p:first
tr:even
tr:odd
Note: This Question is unanswered, help us to find answer for this one
Check Answer
382. How do you change the CSS property 'color' of an element?
$("#someID").css("color","red");
$("#someID"))((.style("color","red");
$.css("color:red");
$("#someID").css("color:red");
Answer
Correct Answer:
$("#someID").css("color","red");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
383. code for making all div elements 100 pixels high?
$("div").height(100)
$("div").height="100"
$("div").height.pos=100
$("div").height=("100")
Answer
Correct Answer:
$("div").height(100)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
384. How do you schedule a Javascript function to execute as soon as the document has been interpreted by the browser?
.load()
.show()
.ready()
.hide()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
385. Which is an example of chaining a jQuery command?
$(#box).fadeOut().fadeIn()
$("#box").fadeOut().fadeIn();
$(“box”).fadeOut().fadeIn()
$(<#box>).fadeOut().fadeIn();
Answer
Correct Answer:
$("#box").fadeOut().fadeIn();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
386. What can be used to append a new paragraph element into a div with id 'mydiv'?
$("div#mydiv").never("
Paragraph
");
$("
Paragraph
").appendTo("div#mydiv");
$("div#mydiv").before("
Paragraph
");
$("
Paragraph
").new("div#mydiv");
Answer
Correct Answer:
$("Paragraph
").appendTo("div#mydiv");
Note: This Question is unanswered, help us to find answer for this one
Check Answer
387. Which of the following does jQuery NOT integrate seamlessly with?
Java
CSS
HTML
DOM
Note: This Question is unanswered, help us to find answer for this one
Check Answer
388. True or False : jQuery method fadeTo() permits fading to a given opacity.
True
False
Note: This Question is unanswered, help us to find answer for this one
Check Answer
389. What method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
classSwitch()
switch()
switchClass()
toggleClass()
Answer
Correct Answer:
toggleClass()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
390. What is the difference between searching 'find()' and 'children()'
There is no find() function
There is no children() function
Both do similar tasks
The .find() and .children() methods are similar, except that the latter only travels a single level down the DOM tree.
Answer
Correct Answer:
The .find() and .children() methods are similar, except that the latter only travels a single level down the DOM tree.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
391. What is jQuery used for?
Overcome cross-browser issues
Rapid web development
Simplify JavaScript coding
All of these
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Check Answer
392. Where does jQuery code run?
client browser
client server
host server
host browser
Answer
Correct Answer:
client browser
Note: This Question is unanswered, help us to find answer for this one
Check Answer
393. Which function is used to make a copy of a selected element?
.copy()
.clone()
.duplicate()
.repeat()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
394. How do you test if an element has a specific class?
use .hasThis()
use.class()
use .isClass()
use .hasClass()
use .getClass()
Answer
Correct Answer:
use .hasClass()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
395. What is the proper way to show an element?
$('#foo').display('show');
$('#foo').style('show');
$('#foo').showElement();
$('#foo').show();
Answer
Correct Answer:
$('#foo').show();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
396. Which function does jQuery provide to remove whitespace from the beginning and end of a string?
$.stripspace( )
jQuery does not provide such function.
$.strip( )
$.trim( )
Answer
Correct Answer:
$.trim( )
Note: This Question is unanswered, help us to find answer for this one
Check Answer
397. Which is a syntactically valid jQuery command?
$("book").fadeOut{}
jQuery("book").fadeOut{}
$(#book).fadeOut();
$("#book").fadeOut();
Answer
Correct Answer:
$("#book").fadeOut();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
398. Illustrate selecting a HTML element using its class:
$('#myClass')
#(".myClass")
$(".myClass")
$("#myClass")
Answer
Correct Answer:
$(".myClass")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
399. Which of the following is valid?
$('p').css('color', 'red');
$('p').css('color: red;');
$('p').css('color: red');
Answer
Correct Answer:
$('p').css('color', 'red');
Note: This Question is unanswered, help us to find answer for this one
Check Answer
400. Which of the following is the correct command to fade in an element over a three-second time period?
fadeIn('three')
fadeIn(3000)
fadeIn('3 seconds')
fadeIn('3 sec')
fadeIn(3)
Answer
Correct Answer:
fadeIn(3000)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
401. What function can be used to alternate an element's state between display and hidden?
toggle
reverse
alternate
flip
switch
Note: This Question is unanswered, help us to find answer for this one
Check Answer
402. What is '$();' equivalent to?
java();
Function();
function();
operator();
jQuery();
Answer
Correct Answer:
jQuery();
Note: This Question is unanswered, help us to find answer for this one
Check Answer
403. jQuery uses CSS selectors to select elements?
True
False
Note: This Question is unanswered, help us to find answer for this one
Check Answer
404. Which selector matches all elements?
#
*
&
?
Note: This Question is unanswered, help us to find answer for this one
Check Answer
405. Which command selects an element using its ID?
${."myID"}
${"#myID"}
#{".myID"}
$("#myID")
Answer
Correct Answer:
$("#myID")
Note: This Question is unanswered, help us to find answer for this one
Check Answer
406. What does the jQuery attr() function do?
Takes the name of an attribute and duplicates it.
Takes the name of an attribute on your page and gives the value of that attribute.
Takes the name of an attribute on the page and makes it animate.
Takes the element and duplicates it.
Answer
Correct Answer:
Takes the name of an attribute on your page and gives the value of that attribute.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
407. Which method is used to hide selected elements?
display(none)
hidden()
hide()
hide(display)
Note: This Question is unanswered, help us to find answer for this one
Check Answer
408. What does this script do? $(function() { $( "#effect" ).animate({ backgroundColor: "#fff" }, 1000 ); });
Changes the background color of the element with class 'effect' to #fff within 1 second.
Changes the background color of the element with id 'effect' to #fff within 1 second.
Answer
Correct Answer:
Changes the background color of the element with id 'effect' to #fff within 1 second.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
409. Which is NOT a jQuery method?
toggle()
show()
fadeIn()
alias()
Note: This Question is unanswered, help us to find answer for this one
Check Answer
410. What do selectors do?
Allows you to select an array in the node list.
Allows the content to be stopped at some point.
Allows you to select HTML elements (or groups of elements) by element name, attribute name or by content.
Allows selection of libraries.
Answer
Correct Answer:
Allows you to select HTML elements (or groups of elements) by element name, attribute name or by content.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
411. Which is a class selector?
$('_name')
$('#name')
$('.name')
Answer
Correct Answer:
$('.name')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
412. Is jQuery a library for client scripting or server scripting?
Server Scripting
Client Scripting
Answer
Correct Answer:
Client Scripting
Note: This Question is unanswered, help us to find answer for this one
Check Answer
413. Illustrate the code needed to include the jQuery library in an HTML file:
$(script src)="jQuery.js"(/script)
<script src="jQuery.js"></script>
$script src="jQuery.js"
$(script) src="jQuery.js")
Answer
Correct Answer:
<script src="jQuery.js"></script>
Note: This Question is unanswered, help us to find answer for this one
Check Answer
414. Which is an id selector?
$(':name')
$('#name')
$('.name')
Answer
Correct Answer:
$('#name')
Note: This Question is unanswered, help us to find answer for this one
Check Answer
415. What language is jQuery constructed in?
JavaScript
C++
Java
PHP
Answer
Correct Answer:
JavaScript
Note: This Question is unanswered, help us to find answer for this one
Check Answer
416. The '#' symbol indicates a lookup on what?
Name
element
Attribute
element's ID
Answer
Correct Answer:
element's ID
Note: This Question is unanswered, help us to find answer for this one
Check Answer
417. What is the difference between .width() and .outerWidth()?
No difference. width() is a shorthand alias for outerWidth()
Only difference is .width() returns a number & outerWidth() returns a string.
width() returns the computed width of the element while outerWidth() returns the width plus all the margins and paddings.
Answer
Correct Answer:
width() returns the computed width of the element while outerWidth() returns the width plus all the margins and paddings.
Note: This Question is unanswered, help us to find answer for this one
Check Answer
418. What keyword would you use to refer to the object on which the currently executing method has been invoked?
object
here
this
medium
that
Note: This Question is unanswered, help us to find answer for this one
Check Answer
419. What does every selector expression return?
jQuery object
HTML text
result set
recordset
Answer
Correct Answer:
jQuery object
Note: This Question is unanswered, help us to find answer for this one
Check Answer
420. What is the END STATE STYLE of the paragraph element in the code $('p').hide(); ?
visibility: hidden;
display: none;
height: 0;
opacity: 0;
Answer
Correct Answer:
display: none;
Note: This Question is unanswered, help us to find answer for this one
Check Answer
421. The selector :disabled will perform the following:
Select only elements in a disabled state
Create a new element with the state set to disabled
None of the above
Disable any elements currently set to an enabled state
Answer
Correct Answer:
Select only elements in a disabled state
Note: This Question is unanswered, help us to find answer for this one
Check Answer
422. $(function(){ //executable code }); The executable code will be run:
after everything has loaded
after everything except other scripts are loaded
after all other javascript has been read and executed
before anything has loaded
after the DOM has loaded, but prior to anything else loading
Answer
Correct Answer:
after the DOM has loaded, but prior to anything else loading
Note: This Question is unanswered, help us to find answer for this one
Check Answer
423. What is the equivalent of the following code? $('div').click(function {alert(1);});
$('div').handler('click',function {alert(1);});
$('div').bind('click',function {alert(1);});
$('div').call('click',function {alert(1);});
$('div').event('click',function {alert(1);});
Answer
Correct Answer:
$('div').bind('click',function {alert(1);});
Note: This Question is unanswered, help us to find answer for this one
Check Answer
424. What does this code do: $('#id1').animate({width:'250px'}, 'slow').animate({height:'250px'}, 'fast');
First the height animates, then the width animates.
First the width animates, then the height animates.
Both the width and height animates at the same time.
Answer
Correct Answer:
First the width animates, then the height animates.
Note: This Question is unanswered, help us to find answer for this one
Check Answer