Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

jQuery Interview Questions and Answers

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

jQuery interview questions

  1. What is jQuery ?
    jQuery is an open source JavaScript library that simplifies the interactions between an HTML/CSS document, or more precisely the Document Object Model (DOM) and JavaScript.
    Elaborating the terms, jQuery simplifies HTML document traversing and manipulation, browser event handling, DOM animations, Ajax interactions, and cross-browser JavaScript development.

  3. Does jQuery HTML work for both HTML and XML documents ?
    No, JQuery HTML doesn’t work with XML document. It only works for HTML documents.

  5. What are jQuery Selectors ? Give some examples.
    jQuery selectors are used to select the HTML elements and allows you to manipulate the HTML elements in a way we want. It selects the HTML elements on a variable parameter such as their name, classes, id, types, attributes, attribute values, etc. All selectors in jQuery are selected using a special sign i.e. dollar sign and parentheses:

    • Elements Selector: The elements selector selects the element on the basis of its name.

    • Id Selector: The id selector selects the element on the basis of its id.

    • Class Selector: The class selector selects the element on the basis of its class.


  7. What are the advantages of jQuery ?
    • It contains wide range of plug-ins. jQuery allows developers to create plug-ins on top of the JavaScript library.
    • Large development community.
    • It has a good and comprehensive documentation.
    • It contains lots of JavaScript library and it is easy to use compared to the standard JavaScript.
    • jQuery lets users develop Ajax templates with ease, Ajax enables a sleeker interface where actions can be performed on pages without requiring the entire page to be reloaded.
    • Being lightweight and a powerful chaining capability makes jQuery more strong.

  9. What are the methods used to provide effects?
    Some of methods are listed below which provides the effect:


  11. Difference between .empty(), .remove() and, .detach() in Jquery ?
    • jQuery empty() Method: The empty() method in jQuery is used to remove all child nodes and its content for the selected elements.
    • jQuery remove() Method: The remove() method in JQuery is used to remove all the selected elements including all the text. This method also remove data and all the events of the selected elements.
    • jQuery detach() Method: The detach() method in jQuery is used to remove the selected elements from the DOM tree including its all text and child nodes but it keeps the data and the events. Document Object Model (DOM) is a World Wide Web Consortium standard. This defines for accessing elements in the DOM tree.
    • Note: The remove() method is faster than empty() or detach() method.


  12. Is jQuery a JavaScript or JSON library file ?
    jQuery is a library of JavaScript file and it consists of DOM event effects and also the Ajax functions. jQuery is alleged to be one JavaScript file.

  14. What are the various ajax functions available in Jquery ?
    Ajax allows the user to exchange data with a server and update parts of a page without reloading the entire page. Some of the functions of ajax are as follows:


  16. Mention the compatible operating systems with jQuery.
    • Mac
    • Windows
    • Linux

  18. How to include the jQuery library in the ASP.Net project ?
    • Download the jQuery library from
    • include that reference in the page.

  20. Explain bind() vs live() vs delegate() methods in jQuery.
    The bind() method does not attach the events to those elements that are added once DOM is loaded whereas live() and delegate() methods attach events to the future elements also.

    The difference between live() and delegate() methods is that the live() function does not work in chaining. It will work only on a selector or an element while delegate() method will work in chaining.


  22. Write the command that gives the version of jQuery ?
    The command $.ui.version returns jQuery UI version.

  24. What is jQuery connect ?
    A jQuery connect is a plugin that is used to connect or bind a function with another function. Connect is used to execute the function from the other function or plugin is executed.

  26. How to use connect ?
    • Download jQuery connect file from
    • Include that file in the HTML file.
    • Use $.connect function to connect a function to another function.

  28. What is the use of param() method in JQuery ?
    The param() method in jQuery is used to create a serialized representation of an object.

  30. Difference between $(this) and this in jQuery ?
    The this and $(this) references are same but the difference is “this” is used in the traditional way but when “this” is used with $() then it becomes a jQuery object.

  32. Difference between find and children methods ?
    The find() method is used to find all the descendant elements of the selected element and the children() method is used to find all the children element related to that selected element.

  34. In what scenarios jQuery can be used ?
    jQuery can be used in following scenarios:

    • Mainly for Animation effects
    • Manipulation purpose
    • Calling functions on events
    • Apply CSS static or dynamic

  36. How to read, write and delete cookies in jQuery ?
    We can deal with cookies in jquery using Dough cookie plugin. Dough is easy to use and has powerful features.

    • Create cookie:
      $.dough(“cookie_name”, “cookie_value”);
    • Read Cookie:
    • Delete cookie:
      $.dough(“cookie_name”, “remove”);

  38. Features of jQuery which are used in web applications ?
    jQuery uses features like Sliding, File uploading and accordian in web applications.

jQuery is an open source JavaScript library that simplifies the interactions between an HTML/CSS document, It is widely famous with it’s philosophy of “Write less, do more”.
You can learn jQuery from the ground up by following this jQuery Tutorial and jQuery Examples.

My Personal Notes arrow_drop_up
Last Updated : 03 Aug, 2021
Like Article
Save Article
Similar Reads
Related Tutorials