Tag Archives: jquery interview questions and answers

151. What are the methods used to provide effects? Some of the effects methods are: • Show() • Hide() • Toggle() • FadeIn() and • FadeOut() 152. What is method chaining in jQuery? Provide an example.What advantages does it offer? Method chaining is a feature of jQuery that allows several methods to be executed on

141. Explain slideToggle() effect. -slideToggle() effect is used to give animated sliding effect to an element. Syntax: slideToggle([ duration] [, easing] [, callback]) • “duration” is the number specifying how long the animation will run. • “easing” is the string which specify the function for the transition. • “callback” is the function which we want

131. Can you include multiple version of jQuery? If yes, then how they are executed? Yes. Multiple versions of jQuery can be included in same page. 132. In what situation you would use multiple version of jQuery and how would you include them? Well, it is quite possible that the jQuery plugins which are used

121. How to create clone of any object using jQuery? 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. $(document).ready(function(){ $('#btnClone').click(function(){ $('#dvText').clone().appendTo('body'); return false; }); }); 122. Does events are also

111. Can we execute/run multiple Ajax request simultaneously in jQuery? If yes, then how? 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

101. How to get the server response from an AJAX request using Jquery? When invoking functions that have asynchronous behavior We must provide a callback function to capture the desired result. This is especially important with AJAX in the browser because when a remote request is made, it is indeterminate when the response will be

91. With jQuery UI 1.7 being released in the last few days, what do you see as the key parts of jQuery UI 1.7? What are you most proud of out of that release? The one thing I’m most proud of is that our framework has matured so much since 1.5. We have taken great

81. What is the difference between eq() and get() methods in jQuery? 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

71. What is the use of jquery .each() function? 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. 72. What is the difference between jquery.size() and jquery.length? jQuery .size() method returns number of element

61. What are the types of selectors in jQuery? There are three types of selectors in jQuery: • CSS Selector • XPath Selector • Custom Selector 62. How jQuery selectors are executed? Your last selectors is always executed first. For example, in below jQuery code, jQuery will first find all the elements with class “.myCssClass”