JQuery Interview Questions

1.What is jQuery?
jQuery is not a programming language but a well written JavaScript code. It is a JavaScript code, which do document traversing, event handling, Ajax interactions and Animations.

2.What are the methods used to provide effects?
  •     Show()
  •     Hide()
  •     Toggle()
  •     FadeIn() and
  •     FadeOut()

3.Is jQuery is a JavaScript or JSON library file?
jQuery is a library of JavaScript file and it consists of DOM, event effects and the Ajax functions. jQuery is said to be a single JavaScript file.

4.Is it possible that jQuery HTML work for both HTML and XML document?
No, jQuery HTML only works for HTML document. It doesn't work for XML documents.

5.What is $() in jQuery library?
The $() function is an alias of jQuery() function. It is used to wrap any object into jQuery object which later facilitates you to call various method defined jQuery object. You can pass a selector string to $() function and it will return jQuery object which contains an array of all matched DOM elements.

6.How JavaScript and jQuery are different?
JavaScript is a language While jQuery is a library built in the JavaScript language that helps to use the JavaScript language.

7.Why there are two different version of jQuery library?
  •     Development
  •     Production/Deployment

8.What is a CDN?
A content delivery network or content distribution network (CDN) is a large distributed 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 high performance.

9.What does $("div.parent") will select?
All the div element with parent class.

10.Difference between $(this) and 'this' in jQuery?
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.

11.How to check data type of any variable in jQuery?
Using $.type(Object) which returns the built-in JavaScript type for the object.

12.Can we use jQuery to make ajax request?
Yes. jQuery can be used for making ajax request.

13.What is jQuery connect?
A ‘ jQuery connect’  is a plugin used to connect or bind a function with another  function. Connect is used to execute function from any other function or plugin is executed.

14.What are the browser related issues for jQuery?
Browser compatibility of jQuery plugin is an issue and needs lot of time to fix it.

15.What is the use of jQuery load method?
jQuery load method is a powerful AJAX method which is used to load the data from a server and assign the data into the element without loading the page.

16.What is the use of jQuery filter?
The jQuery filter is used to filter the certain values from the object list based on the criteria. Example is to filter certain products from the master list of products in a cart website.

17.What is called chaining?
Chaining is used to connect multiple events and functions in a selector.

18.What are the advantages of jQuery?
  •     Just a JavaScript enhancement
  •     Coding is simple, clear, reusable
  •     Removal of writing more complex conditions and loops

19.How method can be called inside code behind using jQuery?
$.ajax can be called and by declaring WebMethod inside code behind using jQuery.

20.What is the slowest selector in jQuery?
Class selectors are the slowest selectors in jQuery.

Pageviews from the past week