Jquery Interview Questions And Answers

Jquery Interview Questions list for experienced

  1. What is jQuery ?
  2. How you will use Jquery means requirement needed for using jquery ?
  3. what the use of $ symbol in Jquery ?
  4. How do you select an item using css class or ID and get the value by use of jquery?
  5. How to get the server response from an AJAX request using Jquery?
  6. How do you update ajax response with id \" resilts\" ?
  7. How do You disable or enable a form element?
  8. How do you check or uncheck a checkbox input or radio button?
  9. How do you get the text value of a selected option?
  10. What is Traversing in jquery?
  11. Explain jQuery Traversing - Ancestors?
  12. Explain jQuery parent() Method?
  13. Explain jQuery parentsUntil() method?
  14. Explain jQuery Traversing - Descendants?
  15. What are the types of selectors in jQuery?
  16. Where jQuery code is getting executed?
  17. What is the method used to define the specific character in place of $ sign?
  18. What are the advantages of using jQuery over JavaScript in ASP.NET web application
  19. Name the Jquery methods which are used for apply css class?
  20. What is the use of attr() method in Jquery?
  21. Can we use both jQuery and AJAX together?
  22. Name the 5 Jquery events?
  23. How do you check if an element exists or not in jQuery?
  24. What is the use of jQuery .each() function?
  25. What is the difference between jquery.size() and jquery.length?
  26. How do you implement animation functionality?
  27. How to disable jQuery animation?
  28. How do you stop the currently-running animation?
  29. What is the difference between .empty(), .remove() and .detach() methods in jQuery?
  30. Explain .bind() vs .live() vs .delegate() vs .on()
  31. What is wrong with this code line \"$(\'#myid.3\').text(\'blah blah!!!\');\" ?
  32. How to create clone of any object using jQuery?
  33. Does events are also copied when you clone any element in jQuery?
  34. What is difference between prop and attr?
  35. What is event.PreventDefault?
  36. What is the difference between event.PreventDefault and event.stopPropagation?
  37. What is the difference between event.PreventDefault and \"return false\"?
  38. How to check if number is numeric while using jQuery 1.7+?
  39. Can you include multiple version of jQuery? If yes then how they are executed?
  40. How do you attach an event to element which should be executed only once?
  41. In what situation you would use multiple version of jQuery and how would you include them?
  42. Is it possible to hold or delay document.ready execution for some time?
  43. You get \"jquery is not defined\" or \"$ is not defined\" error. What could be the reason?
  44. How to write browser specific code using jQuery?
  45. Can we use jQuery to make ajax request?
  46. What are various methods to make ajax request in jQuery
  47. Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?
  48. What are deferred and promise object in jQuery?
  49. Can we execute/run multiple Ajax request simultaneously in jQuery? If yes, then how?
  50. Can you call C# code-behind method using jQuery? If yes, then how?
  51. Which is the latest version of jQuery library?
  52. Does jQuery 2.0 supports IE?

Jquery interview questions and answers on advance and basic Jquery with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Jquery also add your Questions if any you have to ask and for apply in Jquery Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Jquery interview questions and answers for freshers and experienced

What is Jquery ?

Answer : jQuery is a JavaScript Library.jQuery greatly simplifies JavaScript programming.jQuery is easy to learn.

Questions : 1 :: What is jQuery ?

It's very simple but most valuable Question on jQuery means jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, animating, event handling, and Ajax interactions...View answers

Questions : 2 :: How you will use Jquery means requirement needed for using jquery ?

Nothing more need to do just olny download jquery library(.js file) from any of the jquery site Download jquery and just linked with your html pages like all other javascript file like below :...View answers

Questions : 3 :: what the use of $ symbol in Jquery ?


$ Symbol is just replacement of jquery means at the place of $ you may use jquery hence $ symbol is used for indication that this line used for jquery

Questions : 4 :: How do you select an item using css class or ID and get the value by use of jquery?

If an element of html like < div> , < p> or any tag have ID MyId and class used MyClass then we select the element by below jquery code $('#MyId') for ID and for classs $('.MyClass')...View answers

Questions : 5 :: 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...View answers

Questions : 6 :: How do you update ajax response with id " resilts" ?


By using below code we can update div content where id 'results' with ajax response function updateStatus() { $.ajax({ url: 'pcdsEmpRecords.php', success:...View answers

Questions : 7 :: How do You disable or enable a form element?

There are two ways to disable or enable form elements. Set the 'disabled' attribute to true or false: // Disable #pcds $('#pcds').attr('disabled', true); // Enable #pcds...View answers

Questions : 8 :: How do you check or uncheck a checkbox input or radio button?

There are two ways to check or uncheck a checkbox or radio button. Set the 'checked' attribute to true or false. // Check #pcds $('#pcds').attr('checked', true); // Uncheck #pcds...View answers

Questions : 9 :: How do you get the text value of a selected option?


Select elements typically have two values that you want to access. First there's the value to be sent to the server, which is easy: $("#pcdsselect").val(); // => 1 The second is the text...View answers

Questions : 10 :: What is Traversing in jquery?

jQuery traversing, which means "move through", are used to "find" (or select) HTML elements based on their relation to other elements. Start with one selection and move through that selection...View answers

Questions : 11 :: Explain jQuery Traversing - Ancestors?

An ancestor is a parent, grandparent, great-grandparent, and so on. With jQuery you can traverse up the DOM tree to find ancestors of an element.   Traversing Up the DOM Tree Three useful...View answers

Questions : 12 :: Explain jQuery parent() Method?

The parent() method returns the direct parent element of the selected element.This method only traverse a single level up the DOM tree. The parents() method returns all ancestor elements of the...View answers

Questions : 13 :: Explain jQuery parentsUntil() method?

The parentsUntil() method returns all ancestor elements between two given arguments. Example $(document).ready(function(){   ...View answers

Questions : 14 :: Explain jQuery Traversing - Descendants?

A descendant is a child, grandchild, great-grandchild, and so on.With jQuery you can traverse down the DOM tree to find descendants of an element.   Traversing Down the DOM Tree Two useful...View answers

Questions : 15 :: What are the types of selectors in jQuery?

There are three types of selectors in jQuery: CSS Selector XPath Selector Custom Selector

Questions : 16 :: Where jQuery code is getting executed?

jQuery code is getting executed on a client browser.

Questions : 17 :: What is the method used to define the specific character in place of $ sign?

‘NoConflict’ method is used to reference a jQuery and save it in a variable. That variable can be used instead of Sign

Questions : 18 :: What are the advantages of using jQuery over JavaScript in ASP.NET web application

Below are the advatages of using jQery over JavaScript  a>.Jquery is well written optimised javascript code so  it will be faster in execution unless we write same standard optimised...View answers

Questions : 19 :: Name the Jquery methods which are used for apply css class?

$("#Id1").addClass('YourClassName'); // for apply class $("#Id1").removeClass('YourClassName'); // for remove class

Questions : 20 :: What is the use of attr() method in Jquery?

The attr() method sets or returns attributes and values of the selected elements.  When this method is used to return the attribute value, it returns the value of the first matched element....View answers

Questions : 21 :: Can we use both jQuery and AJAX together?

YES.

Questions : 22 :: Name the 5 Jquery events?

 jQuery Events  jQuery click() event.  jQuery dblclick() event.  jQuery mouseenter() event.  jQuery mouseleave() event.  jQuery mousedown() event.  jQuery mouseup()...View answers

Questions : 23 :: How do you check if an element exists or not in jQuery?

Using jQuery length property, we can ensure whether element exists or not.   $(document).ready(function(){if ($('#element').length > 0){//Element...View answers

Questions : 24 :: 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.

Questions : 25 :: What is the difference between jquery.size() and jquery.length?

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...View answers

Questions : 26 :: How do you implement animation functionality?

 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...View answers

Questions : 27 :: How to disable jQuery animation?

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...View answers

Questions : 28 :: How do you stop the currently-running animation?

 Using jQuery ".stop()" method.

Questions : 29 :: What is the difference between .empty(), .remove() and .detach() methods in jQuery?

All these methods .empty(), .remove() and .detach() are used for removing elements from DOM but they all are different.  .empty(): This method removes all the child element of the matched...View answers

Questions : 30 :: Explain .bind() vs .live() vs .delegate() vs .on()

 All these 4 jQuery methods are used for attaching events to selectors or elements. But they all are different from each other.  .bind(): This is the easiest and quick method to bind...View answers

Questions : 31 :: What is wrong with this code line "$('#myid.3').text('blah blah!!!');" ?

The problem with above statement is that the selectors is having meta characters and to use any of the meta-characters (such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a...View answers

Questions : 32 :: 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....View answers

Questions : 33 :: Does events are also copied when you clone any element in jQuery?

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()...View answers

Questions : 34 :: What is difference between prop and attr?

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...View answers

Questions : 35 :: What is event.PreventDefault?

The event.preventDefault() method stops the default action of an element from happening. For example, prevents a link from following the URL.

Questions : 36 :: What is the difference between event.PreventDefault and event.stopPropagation?

 event.preventDefault(): Stops the default action of an element from happening. event.stopPropagation(): Prevents the event from bubbling up the DOM tree, preventing any parent handlers from...View answers

Questions : 37 :: What is the difference between event.PreventDefault and "return false"?

 e.preventDefault() will prevent the default event from occurring, e.stopPropagation() will prevent the event from bubbling up and return false will do both.

Questions : 38 :: How to check if number is numeric while using jQuery 1.7+?

 Using $.type(Object) which returns the built-in JavaScript type for the object.

Questions : 39 :: 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.

Questions : 40 :: How do you attach an event to element which should be executed only once?

 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...View answers

Questions : 41 :: 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 are dependent on older version but for your own jQuery code, you would like to use newer version. So because of this dependency,...View answers

Questions : 42 :: Is it possible to hold or delay document.ready execution for some time?

 Yes, it’s possible. With Release of jQuery 1.6, a new method "jQuery.holdReady(hold)" was introduced. This method allows to delay the execution of document.ready() event....View answers

Questions : 43 :: You get "jquery is not defined" or "$ is not defined" error. What could be the reason?

 There could be many reasons for this. 1:You have forgotten to include the reference of jQuery library and trying to access jQuery.  2:You have included the reference of the jQuery file,...View answers

Questions : 44 :: How to write browser specific code using jQuery?

 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.

Questions : 45 :: Can we use jQuery to make ajax request?

 Yes. jQuery can be used for making ajax request

Questions : 46 :: What are various methods to make ajax request in jQuery

 Using below jQuery methods, you can make ajax calls. 1-load() : Load a piece of html into a container DOM 2-$.getJSON(): Load JSON with GET method. 3-$.getScript(): Load a JavaScript...View answers

Questions : 47 :: Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?

   By 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...View answers

Questions : 48 :: What are deferred and promise object in jQuery?

 Deferred and promise are part of jQuery since version 1.5 and they help in handling asynchronous functions like Ajax.

Questions : 49 :: 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....View answers

Questions : 50 :: Can you call C# code-behind method using jQuery? If yes, then how?

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

Questions : 51 :: Which is the latest version of jQuery library?

 The latest version (when this post is written) of jQuery is 1.10.2 or 2.0.3. jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.

Questions : 52 :: Does jQuery 2.0 supports IE?

 No. jQuery 2.0 has no support for IE 6, IE 7 and IE 8.
More Question

Ask your interview questions on Jquery

Write Your comment or Questions if you want the answers on Jquery from Jquery Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---