JQuery

{ "iq":[{"id":"1",
    "q":"  What is jQuery?",
    "answer":" jQuery is fast, lightweight and feature-rich client side JavaScript\nLibrary/Framework. It is one of the most popular client side libraries and as per a survey it runs onevery second website."
  },
    {"id":"2",
      "q":"Why do we use jQuery?",
      "answer":"Due to following advantages.\nEasy to use and learn.\nEasily expandable.\nCross-browser support\nEasy to use for DOM manipulation and traversal.\nLarge pool of built in methods.\nAJAX Capabilities.\nMethods for changing or applying CSS, creating animations.\nEvent detection and handling.\nTons of plug-ins for all kind of needs. "
    },
    {"id":"3",
      "q":"How JavaScript and jQuery are different?",
      "answer":"JavaScript is a language while jQuery is a library built in the JavaScript languagethat helps to use the JavaScript language."
    },

    {"id":"4",
      "q":" Is jQuery replacement of Java Script?",

      "answer":"No. jQuery is not a replacement of JavaScript. jQuery is a different library which\nis written on top of JavaScript. jQuery is a lightweight JavaScript library that\nemphasizes interaction between JavaScript and HTML.  "
    },
    {"id":"5",
      "q":" Is jQuery a library for client scripting or server scripting? ",
      "answer":"Client side scripting."
    },
    {"id":"6",
      "q":"Does jQuery follow W3C recommendations? ",
      "answer":"No  "
    },

    {"id":"7",
      "q":" What is the basic need to start with jQuery?",
      "answer":" To start with jQuery, one needs to make reference of its library. The latestversion of jQuery can be downloaded from jQuery.com. "
    },

    {"id":"8",
      "q":" Which is the starting point of code execution in jQuery?",
      "answer":"The starting point of jQuery code execution is $(document).ready() function\nwhich is executed when DOM is loaded."
    },
    {"id":"9",
      "q":" What does dollar sign ($) means in jQuery?",

      "answer":" Dollar Sign is nothing but it's an alias for JQuery. Take a look at below jQuery code.\n$(document).ready(function(){});\nOver here $ sign can be replaced with jQuery keyword.\njQuery(document).ready(function(){\n});"
    },

    {"id":"10",
      "q":" Can we have multiple document.ready() function on the same page?",
      "answer":"YES. We can have any number of document.ready() function on the same page."
    },

    {"id":"11",
      "q":" Can we use our own specific character in the place of $ sign in jQuery?",

      "answer":" Yes. It is possible using jQuery.noConflict()."
    },

    {"id":"12",
      "q":"  Is it possible to use other client side libraries like MooTools, Prototype along with jQuery?",
      "answer":"Yes"
    },
    {"id":"13",
      "q":" What is jQuery.noConflict?",
      "answer":"As other client side libraries like MooTools, Prototype can be used with jQuery and they also use $() as their global function and to define variables. This situationcreates conflict as $() is used by jQuery and other library as their global function. Toovercome from such situations, jQuery has introduced jQuery.noConflict().\njQuery.noConflict();\njQuery(document).ready(function(){\njQuery(div).hide();\n});\nYou can also use your own specific character in the place of $ sign in jQuery.\nvar $j = jQuery.noConflict();\n$j(document).ready(function(){\n  $j(div).hide();\n}); "},

    {"id":"14",
      "q":" Is there any difference between body onload() and document.ready() function?",
      "answer":"  document.ready() function is different from body onload() function for 2 \nreasons.\n1. We can have more than one document.ready() function in a page where wecan have only one body onload function.\n2. document.ready() function is called as soon as DOM is loaded wherebody.onload() function is called when everything gets loaded on the page thatincludes DOM, images and all associated resources of the page."
    },

    {"id":"15",
      "q":"What is the difference between .js and .min.js?",
      "answer":"jQuery library comes in 2 different versions Production and Deployment. Thedeployment version is also known as minified version. So .min.js is basically theminified version of jQuery library file. Both the files are same as far as functionality isconcerned. But .min.js is quite small in size so it loads quickly and saves bandwidth.  "
    },

    {"id":"16",
      "q":" Why there are two different version of jQuery library? ",
      "answer":"jQuery library comes in 2 different versions.\n1. Production\n2. Deployment\nThe production version is quite useful at development time as jQuery is open sourceand if you want to change something then you can make those changes inproduction version. But the deployment version is minified version or compressedversion so it is impossible to make changes in it. Because it is compressed, so its sizeis very less than the production version which affects the page load time."
    },

    {"id":"17",
      "q":"What is a CDN?",
      "answer":"A content delivery network or content distribution network (CDN) is a largedistributed system of servers deployed in multiple data centers across the Internet.The goal of a CDN is to serve content to end-users with high availability and highperformance. "
    },
    {"id":"18",
      "q":"Which are the popular jQuery CDN? And what is the advantage of using CDN? ",
      "answer":"There are 3 popular jQuery CDNs.\n1. Google.\n2. Microsoft\n3. jQuery.\n\nAdvantage of using CDN.\nIt reduces the load from your server.\nIt saves bandwidth. jQuery framework will load faster from these CDN.\nThe most important benefit is it will be cached, if the user has visited any sitewhich is using jQuery framework from any of these CDN"
    },

    {"id":"19",
      "q":" How to load jQuery from CDN?",
      "answer":"Below is the code to load jQuery from all 3 CDNs.\nCode to load jQuery Framework from Google CDN\n<script type=text/javascript\nsrc=http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js>\n</script>\nCode to load jQuery Framework from Microsoft CDN\n<script type=text/javascript\nsrc=http://ajax.microsoft.com/ajax/jquery/jquery-1.9.1.min.js>\n</script>\nCode to load jQuery Framework from jQuery Site (EdgeCast CDN)\n<script type=text/javascript\nsrc=http://code.jquery.com/jquery-1.9.1.min.js>\n</script>  "
    },

    {"id":"20",
      "q":" How to load jQuery locally when CDN fails?",
      "answer":":It is a good approach to always use CDN but sometimes what if the CDN is down (rare possibility though) but you never know in this world as anything can happen.\nBelow given jQuery code checks whether jQuery is loaded from Google CDN or not, ifnot then it references the jQuery.js file from your folder.\n<script type=text/javascript\nsrc=http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js></script>\n<script type=text/javascript>\nif (typeof jQuery == 'undefined')\n{\ndocument.write(unescape(%3Cscript src='Scripts/jquery.1.9.1.min.js'\ntype='text/javascript'%3E%3C/script%3E));\n}\n</script>\nIt first loads the jQuery from Google CDN and then checks the jQuery object. IfjQuery is not loaded successfully then it will references the jQuery.js file from harddrive location. In this example, the jQuery.js is loaded from Scripts folder."
    },
    {"id":"21",
      "q":" What are selectors in jQuery and how many types of selectors are there?",
      "answer":"To work with an element on the web page, first we need to find them. To find the html element in jQuery we use selectors. There are many types of selectors but basic selectors are:\nName: Selects all elements which match with the given element Name.\n#ID: Selects a single element which matches with the given ID\n.Class: Selects all elements which match with the given Class.\nUniversal (*): Selects all elements available in a DOM.\nMultiple Elements E, F, G: Selects the combined results of all the specified selectors E, F or G.\nAttribute Selector: Select elements based on its attribute value.   "
    },
    {"id":"22",
      "q":"How do you select element by ID in jQuery?",
      "answer":"To select element use ID selector. We need to prefix the id with # (hash symbol). For example, to select element with ID txtName, then syntax would be,\n1$('#txtName')"
    },

    {"id":"23",
      "q":" What does $(div) will select?",
      "answer":" This will select all the div elements on page."
    },{"id":"24",
      "q":"How to select element having a particular class (.selected)? ",
      "answer":" $('.selected'). This selector is known as class selector. We need to prefix the class name with .(dot)."
    },{"id":"25",
      "q":"  What does $(div.parent) will select? ",
      "answer":"All the div element with parent class."
    },{"id":"26",
      "q":"What are the fastest selectors in jQuery?",
      "answer":"ID and element selectors are the fastest selectors in jQuery."
    },{"id":"27",
      "q":" What are the slow selectors in jQuery?",
      "answer":" class selectors are the slow compare to ID and element."
    },{"id":"28",
      "q":"How jQuery selectors are executed?  ",
      "answer":"Your last selectors is always executed first. For example, in below jQuery code, jQuery will first find all the elements with class .myCssClass and after that it will reject all the other elements which are not in p#elmID.\n1.$(p#elmID .myCssClass);"
    },{"id":"29",
      "q":"Which is fast document.getElementByID('txtName') or $('#txtName').?",
      "answer":"Native JavaScipt is always fast. jQuery method to select txtName $(#txtName) will internally makes a call to document.getElementByID('txtName'). As jQuery is written on top of JavaScript and it internally uses JavaScript only So JavaScript is always fast."
    },{"id":"30",
      "q":" Difference between $(this) and 'this' in jQuery? ",
      "answer":"this and $(this) refers to the same element. The only difference is the way they are used. 'this' is used in traditional sense, when 'this' is wrapped in $() then it becomes a jQuery object and you are able to use the power of jQuery.\n1 $(document).ready(function(){\n2. $('#spnValue').mouseover(function(){\n3.alert($(this).text());\n4.});\n5 });\n In below example, this is an object but since it is not wrapped in $(), we can't use jQuery method and use the native JavaScript to get the value of span element.\n1$(document).ready(function(){\n 2 $('#spnValue').mouseover(function(){\n 3 alert(this.innerText);\n 4 });\n 5 });"
    },{"id":"31",
      "q":" How do you check if an element is empty? ",
      "answer":"There are 2 ways to check if element is empty or not. We can check using :empty selector.\n1 $(document).ready(function(){\n 2 if ($('#element').is(':empty')){3\n});\nAnd the second way is using the $.trim() method.\n1$(document).ready(function(){\n2if($.trim($('#element').html())=='') {\n3\n4}\n5});"
    },{"id":"32",
      "q":" How do you check if an element exists or not in jQuery?",
      "answer":" Using jQuery length property, we can ensure whether element exists or not.\n1$(document).ready(function(){\n2if ($('#element').length > 0){\n3\n 4});\n5});"
    },{"id":"33",
      "q":" What is the use of jquery .each() function?",
      "answer":"The $.each() function is used to iterate over a jQuery object. The $.each() function can be used to iterate over any collection, whether it is an object or an array.  "
    },{"id":"34",
      "q":" What is the difference between jquery.size() and jquery.length?",
      "answer":"jQuery .size() method returns number of element in the object. But it is not preferred to use the size() method as jQuery provide .length property and which does the same thing. But the .length property is preferred because it does not have the overhead of a function call.   "
    },{"id":"35",
      "q":"What is the difference between $('div') and $('<div/>') in jQuery?",
      "answer":"$('<div/>') : This creates a new div element. However this is not added to DOM tree unless you don't append it to any DOM element.$('div') : This selects all the div element present on the page."
    },{"id":"36",
      "q":" What is the difference between parent() and parents() methods in jQuery?",
      "answer":"The basic difference is the parent() function travels only one level in the DOM tree, where parents() function search through the whole DOM tree."
    },{"id":"37",
      "q":" What is the difference between eq() and get() methods in jQuery?",
      "answer":"eq() returns the element as a jQuery object. This method constructs a new jQuery object from one element within that set and returns it. That means that you can use jQuery functions on it.get() return a DOM element. The method retrieve the DOM elements matched by the jQuery object. But as it is a DOM element and it is not a jQuery-wrapped object. So jQuery functions can't be used. "
    },{"id":"38",
      "q":"  How do you implement animation functionality?",
      "answer":" The .animate() method allows us to create animation effects on any numeric CSS property. This method changes an element from one state to another with CSS styles. The CSS property value is changed gradually, to create an animated effect.\nSyntax is:\n1\n(selector).animate({styles},speed,easing,callback)\nstyles: Specifies one or more CSS properties/values to animate.\nduration: Optional. Specifies the speed of the animation.\neasing: Optional. Specifies the speed of the element in different points of the animation. Default value is swing.\ncallback: Optional. A function to be executed after the animation completes.\nSimple use of animate function is,\n1\n$(btnClick).click(function(){\n  2\n$(#dvBox).animate({height:100px});\n3\n});"
    },


    {"id":"39",
      "q":" How to disable jQuery animation? ",
      "answer":"Using jQuery property jQuery.fx.off, which when set to true, disables all the jQuery animation. When this is done, all animation methods will immediately set elements to their final state when called, rather than displaying an effect."
    },

    {"id":"40",
      "q":"  How do you stop the currently-running animation?",
      "answer":" Using jQuery .stop() method. "
    },

    {"id":"41",
      "q":"  What is the difference between .empty(), .remove() and .detach() methods in jQuery?",
      "answer":"All these methods .empty(), .remove() and .detach() are used for removing elements from DOM but they all are different.\n.empty(): This method removes all the child element of the matched element where remove() method removes set of matched elements from DOM.\n.remove(): Use .remove() when you want to remove the element itself, as well as everything inside it. In addition to the elements themselves, all bound events and jQuery data associated with the elements are removed.\n.detach(): This method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements. This method is useful when removed elements are to be reinserted into the DOM at a later time.\n"
    },

    {"id":"42",
      "q":"   Explain .bind() vs .live() vs .delegate() vs .on() ",
      "answer":"All these 4 jQuery methods are used for attaching events to selectors or elements. But they all are different from each other.\n.bind(): This is the easiest and quick method to bind events. But the issue with bind() is that it doesn't work for elements added dynamically that matches the same selector. bind() only attach events to the current elements not future element. Above that it also has performance issues when dealing with a large selection.\n.live(): This method overcomes the disadvantage of bind(). It works for dynamically added elements or future elements. Because of its poor performance on large pages, this method is deprecated as of jQuery 1.7 and you should stop using it. Chaining is not properly supported using this method.\n.delegate(): The .delegate() method behaves in a similar fashion to the .live() method, but instead of attaching the selector/event information to the document, you can choose where it is anchored and it also supports chaining.\n.on(): Since live was deprecated with 1.7, so new method was introduced named .on(). This method provides all the goodness of previous 3 methods and it brings uniformity for attaching event handlers."
    },

    {"id":"43",
      "q":" What is wrong with this code line $('#myid.3').text('blah blah!!!');  ",
      "answer":" The problem with above statement is that the selectors is having meta characters and to use any of the meta-characters  as a literal part of a name it must be escaped with with two backslashes: \\. For example, an element with id=foo.bar, can use the selector $(#foo\\.bar).\nSo the correct syntax is,\n1\n$('#myid\\.3').text('blah blah!!!');"
    },

    {"id":"44",
      "q":" How to create clone of any object using jQuery?",
      "answer":"  jQuery provides clone() method which performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes.\n1\n$(document).ready(function(){\n2$('#btnClone').click(function(){\n3$('#dvText').clone().appendTo('body');\n4return false;\n  5});\n6});"
    },

    {"id":"45",
      "q":" Does events are also copied when you clone any element in jQuery? ",
      "answer":"As explained in previous question, using clone() method, we can create clone of any element but the default implementation of the clone() method doesn't copy events unless you tell the clone() method to copy the events. The clone() method takes a parameter, if you pass true then it will copy the events as well.\n1\n$(document).ready(function(){\n2$(#btnClone).bind('click', function(){\n3$('#dvClickme').clone(true).appendTo('body');\n4});"
    },


    {"id":"46",
      "q":" What is difference between prop and attr?",
      "answer":" attr(): Get the value of an attribute for the first element in the set of matched elements. Whereas,.prop(): (Introduced in jQuery 1.6) Get the value of a property for the first element in the set of matched elements.\nAttributes carry additional information about an HTML element and come in name=value pairs. Where Property is a representation of an attribute in the HTML DOM tree. once the browser parse your HTML code ,corresponding DOM node will be created which is an object thus having properties.\nattr() gives you the value of element as it was defines in the html on page load. It is always recommended to use prop() to get values of elements which is modified via javascript/jquery , as it gives you the original value of an element's current state. Find out more here."
    },

    {"id":"47",
      "q":"What is event.PreventDefault?",
      "answer":"  The event.preventDefault() method stops the default action of an element from happening. For example, Prevents a link from following the URL."
    },{"id":"48",
      "q":"  What is the difference between event.PreventDefault and event.stopPropagation? ",
      "answer":"\nevent.preventDefault(): Stops the default action of an element from happening.\nevent.stopPropagation(): Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. For example, if there is a link with a click method attached inside of a DIV or FORM that also has a click method attached, it will prevent the DIV or FORM click method from firing."
    },{"id":"49",
      "q":"  What is the difference between event.PreventDefault and return false?",
      "answer":"\ne.preventDefault() will prevent the default event from occurring, e.stopPropagation() will prevent the event from bubbling up and return false will do both.   "
    },{"id":"50",
      "q":" What is the difference between event.stopPropagation and event.stopImmediatePropagation? ",
      "answer":"\nevent.stopPropagation() allows other handlers on the same element to be executed, while event.stopImmediatePropagation() prevents every event from running. For example, see below jQuery code block.\n1$(p).click(function(event){\n 2event.stopImmediatePropagation();\n3});\n4$(p).click(function(event){\n  5\n6 $(this).css(background-color, #f00)\n  \n});\nIf event.stopPropagation was used in previous example, then the next click event on p element which changes the css will fire, but in case event.stopImmediatePropagation(), the next p click event will not fire."},
  {"id":"51",

  "q":"  How to check if number is numeric while using jQuery 1.7+?",
      "answer":" Using isNumeric() function which was introduced with jQuery 1.7.  "
    },
    {"id":"52",
      "q":" How to check data type of any variable in jQuery?",
      "answer":" Using $.type(Object) which returns the built-in JavaScript type for the object.   "
    },{"id":"53",
      "q":"  How do you attach a event to element which should be executed only once? ",
      "answer":"Using jQuery one() method. This attaches a handler to an event for the element. The handler is executed at most once per element. In simple terms, the attached function will be called only once.\n1\n$(document).ready(function() {\n2\n$(#btnDummy).one(click, function() {\n  3\nalert(This will be displayed only once.);\n  4\n});\n5\n});​"
  },{"id":"54",
      "q":" Can you include multiple version of jQuery? If yes, then how they are executed?",
      "answer":"Yes. Multiple versions of jQuery can be included in same page."
    },{"id":"55",
      "q":" In what situation you would use multiple version of jQuery and how would you include them?  ",
      "answer":"Well, it is quite possible that the jQuery plugins which are used are dependent on older version but for your own jQuery code, you would like to use newer version. So because of this dependency, multiple version of jQuery may required sometimes on single page.Below code shows how to include multiple version of jQuery.1\n<script type='text/javascript' src='js/jquery_1.9.1.min.js'></script>\n3<script type='text/javascript'>\n4var $jq = jQuery.noConflict();\n5</script>\n6\n7<script type='text/javascript' src='js/jquery_1.7.2.min.js'></script>\nBy this way, for your own jQuery code use $jq, instead of $ as $jq refers to jQuery 1.9.1, where $ refers to 1.7.2."
    },{"id":"56",
      "q":" Is it possible to hold or delay document.ready execution for sometime?",
      "answer": " Yes, its possible. With Release of jQuery 1.6, a new method jQuery.holdReady(hold) was introduced.\nThis method allows to delay the execution of document.ready() event.document.ready() event is called as soon as your DOM is ready but sometimes there is a situationwhen you want to load additional JavaScript or some plugins which you have referenced.\n$.holdReady(true);\n$.getScript(myplugin.js, function() {\n$.holdReady(false);\n});"
    },{"id":"57",
      "q":"What is chaining in jQuery?  ",
      "answer":"\nChaining is one of the most powerful feature of jQuery. In jQuery, Chaining means to connect multiple functions, events on selectors. It makes your code short and easy to manage and it gives better performance. The chain starts from left to right. So left most will be called first and so on.\n1$(document).ready(function(){\n2$('#dvContent').addClass('dummy');\n3$('#dvContent').css('color', 'red');\n 4$('#dvContent').fadeIn('slow');\n5});​\nThe above jQuery code sample can be re-written using chaining. See below.\n 1​$(document).ready(function(){\n2$('#dvContent').addClass('dummy')\n3.css('color', 'red')\n4.fadeIn('slow');\n5});​Not only functions or methods, chaining also works with events in jQuery."
    },{"id":"58",
      "q":" How does caching helps and how to use caching in jQuery?",
      "answer":"\n Caching is an area which can give you awesome performance, if used properly and at the right place. While using jQuery, you should also think about caching. For example, if you are using any element in jQuery more than one time, then you must cache it. See below code.\n1$(#myID).css(color, red);\n2//Doing some other stuff.....\n3$(#myID).text(Error occurred!);\n4\nNow in above jQuery code, the element with #myID is used twice but without caching. So both the times jQuery had to traverse through DOM and get the element. But if you have saved this in a variable then you just need to reference the variable. So the better way would be, \n1var $myElement = $(#myID).css(color, red)\n 2//Doing some other stuff......\n3$myElement.text(Error occurred!);\n4So now in this case, jQuery won't need to traverse through the whole DOM tree when it is used second time. So in jQuery, Caching is like saving the jQuery selector in a variable. And using the variable reference when required instead of searching through DOM again."
    },{"id":"59",
      "q":"  You get jquery is not defined or $ is not defined error. What could be the reason? ",
      "answer":"There could be many reasons for this.\nYou have forgot to include the reference of jQuery library and trying to access jQuery.\nYou have include the reference of the jQuery file, but it is after your jQuery code.\nThe order of the scripts is not correct. For example, if you are using any jQuery plugin and you have placed the reference of the plugin js before the jQuery library then you will face this error."
    },{"id":"60",
      "q":" How to write browser specific code using jQuery? ",
      "answer":"Using jQuery.browser property, we can write browser specific code. This property contains flags for the useragent, read from navigator.userAgent. This property was removed in jQuery 1.9. "
    },{"id":"61",
      "q":" Can we use jQuery to make ajax request? ",
      "answer":"Yes. jQuery can be used for making ajax request."
    },




    {"id":"62",
      "q":" What are various methods to make ajax request in jQuery? ",
      "answer":"Using below jQuery methods, you can make ajax calls.\nload() : Load a piece of html into a container DO\n$.getJSON(): Load JSON with GET method\n$.getScript(): Load a JavaScript file.\n$.get(): Use to make a GET call and play extensively with the response\n$.post(): Use to make a POST call and don't want to load the response to some container DOM.\n$.ajax(): Use this to do something on XHR failures, or to specify ajax options (e.g. cache: true) on the fly."
    },
    {"id":"63",
      "q":" Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?",
      "answer":"\nBy using jQuery post()/ jQuery get(), you always trust the response from the server and you believe it is going to be successful all the time. Well, it is certainly not a good idea to trust the response. As there can be n number of reason which may lead to failure of response.\nWhere jQuery.ajax() is jQuery's low-level AJAX implementation. $.get and $.post are higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks)."
    },

    {"id":"64",
      "q":" What are deferred and promise object in jQuery?",
      "answer":"\nDeferred and promise are part of jQuery since version 1.5 and they help in handling asynchronous functions like Ajax."
    },

    {"id":"65",
      "q":"  Can we execute/run multiple Ajax request simultaneously in jQuery? If yes, then how?",
      "answer":"Yes, it is possible to execute multiple Ajax request simultaneously or in parallel. Instead of waiting for first ajax request to complete and then issue the second request is time consuming. The better approach to speed up things would be to execute multiple ajax request simultaneously.\nUsing jQuery .when() method which provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events."
    },
    {"id":"66",
      "q":"Can you call C# code-behind method using jQuery? If yes,then how?",

      "answer":"Yes. We can call C# code-behind function via $.ajax. But for do that it is compulsory to mark the method as WebMethod."
    },

    {"id":"67",
      "q":"Which is the latest version of jQuery library?",
      "answer":"The latest version (when this post is written) of jQuery is 3.2.1"
    },

    {"id":"68",
      "q":" What are source maps in jQuery?",

      "answer":" In case of jQuery, Source Map is nothing but mapping of minified version of jQuery against the un-minified version. Source map allows to debug minified version of jQuery library. Source map feature was release with jQuery 1.9."
    },

    {"id":"69",
      "q":" How to use migrate jQuery plugin?",
      "answer":" with release of 1.9 version of jQuery, many deprecated methods were discarded and they are no longer available. But there are many sites in production which are still using these deprecated features and it's not possible to replace them overnight. So jQuery team provided with jQuery Migrate plugin that makes code written prior to 1.9 work with it. "
    },
    {"id":"70",
      "q":" Is it possible to get value of multiple CSS properties in single statement?",
      "answer":" Well, before jQuery 1.9 release it was not possible but one of the new feature of jQuery 1.9 was .css() multi-property getter\n1\nvar propCollection = $(#dvBox).css([ width, height, backgroundColor \nIn this case, the propCollection will be an array and it will look something like this.\n1\n{\n2\nwidth: 100px,\n  3\n  height: 200px,\n  4\n  backgroundColor: #FF00FF\n  5\n}"},

    {"id":"71",
      "q":"How do you stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements?",
      "answer":"It can be done via calling .stop([clearQueue ] [, jumpToEnd ]) method and by passing both the parameters as true."
    },

    {"id":"72",
      "q":"What is finish method in jQuery?",
      "answer":"The .finish() method stops all queued animations and places the element(s) in their final state. This method was introduced in jQuery 1.9. "
    },

    {"id":"73",
      "q":" What is the difference between calling stop(true,true) and finish method?",
      "answer":" The .finish() method is similar to .stop(true, true) in that it clears the queue and the current animation jumps to its end value. It differs, however, in that .finish() also causes the CSS property of all queued animations to jump to their end values, as well."
    },

    {"id":"74",
      "q":"  Consider a scenario where things can be done easily with javascript, would you still prefer jQuery?",
      "answer":" No. If things can be done easily via CSS or JavaScript then You should not think about jQuery. Remember, jQuery library always comes with xx kilobyte size and there is no point of wasting bandwidth."
    },
    {"id":"75",
      "q":"  What is jQuery UI?",
      "answer":" jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library that can be used to build interactive web applications."
    },

    {"id":"76",
      "q":"What is the difference between jQuery and jQuery UI? ",
      "answer":" jQuery is the core library. jQueryUI is built on top of it. If you use jQueryUI, you must also include jQuery."
    }








  ]

}