Open In App
Related Articles

jQuery Interview Questions and Answers | Set-2

Improve Article
Save Article
Like Article

jQuery interview questions

We have already discussed some questions in jQuery Interview Questions and Answers | Set-1
Below are some more related questions:

  1. What are the basic selectors in jQuery ?
    Following are the basic selectors in jQuery:

    • Element ID
    • CSS Name
    • Tag Name
    • DOM hierarchy

  3. What are the categories in jQuery Events ?
    • Form
    • Keyboard
    • Mouse
    • Browser
    • Document Loading

  5. What are the browser related issues for jQuery ?
    Compatibility with the Browsers of jQuery plugin is an issue.

  7. What is the use of css() method in JQuery ?
    The css() method in JQuery is used to change style property of the selected element. The css() property in JQuery can be used in different ways.

  9. What is the difference between JavaScript and jQuery ?
    jQuery is a library with APIs designed for JavaScript. JavaScript is an interpreted programming language. jQuery simplifies the use of the JavaScript language.

  11. What are Events in jQuery ?
    Responding to user actions on a webpage is called events. jQuery provides simple methods for attaching event handlers to selections. When an event occurs, the provided function is executed.

  13. Whether we need to add a jQuery file in both the Master and Content page ?
    jQuery file should be added to the Master page and can use access from the content page directly without having any reference to it.

  15. Difference between jQuery.size() and jQuery.length ?
    jQuery.size() method is used to find the number of elements matched by the given selector and jQuery.length property is used to count number of the elements of the jQuery object. jQuery.length property is preferred because it does not have the overhead of a function call.

  17. Can we call C# code behind using jQuery ?
    Yes, we can call C# code from jQuery because it supports .net application.

  19. How to read, write and delete cookies in jQuery ?
    Use the Dough cookie plugin to deal with cookies in jQuery.

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

  21. What is the difference between ID selector and class selector in jQuery ?
    ID selector uses ID while the class selector uses a class to select elements. You can use an ID selector to pick only 1 element. If you want to select a group of elements, having the same CSS class, you can use the class selector.

  23. What is the use of method ? method is used to associate the {data|info|information} with the DOM nodes and also the objects. This data method makes the jQuery code clear and brief.

  25. What is jQuery connect ?
    A plug-in which is used to connect or bind a function with another function. Connect is used to execute a function whenever a function from another object or plug-in is executed.

  27. What is the use of each function in jQuery ?
    Each function is used to iterate each and every element of an object. It is used to loop DOM elements, arrays and the object properties.

  29. Is jQuery required for bootstrap ?
    Bootstrap uses jQuery for JavaScript plugins (like models, tooltips, etc). If just CSS part of Bootstrap is used, you don’t need jQuery.

  31. What are the types of selectors in jQuery ?
    There are three types of selectors in jQuery:

    • CSS Selector
    • XPath Selector
    • Custom Selector

  33. Can a jQuery library be used for server scripting ?
    jQuery is designed with the functionality for client-side scripting. jQuery is not compatible with server-side scripting.

  35. Why jQuery is better than JavaScript ?
    jQuery is a library used for developing Ajax application and it helps to write the code clean and concise. It also handles events, animation, and Ajax support applications.

  37. What is QUnit ?
    QUnit is a powerful, easy-to-use JavaScript unit testing framework. It is used by the jQuery, jQuery UI, and jQuery Mobile projects and is capable of testing any generic JavaScript code.

  39. 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.
Last Updated : 21 Nov, 2019
Like Article
Save Article
Similar Reads
Related Tutorials