Back to Dashboard

JQuery Interview Questions

jQuery is a fast, lightweight, feature-rich client-side JavaScript library. It is cross-platform and supports different types of browsers. It has provided a much-needed boost to JavaScript. Before jQuery, JavaScript codes were lengthy and bigger, even for smaller functions. It makes a website more interactive and attractive.
The simple difference is that JavaScript is a language while jQuery is a built-in library built for JavaScript. jQuery simplifies the use of JavaScript language.
  • It is very easy to learn and use.
  • It is used to develop browser compatible web applications.
  • It improves the performance of an application.
  • It is very fast and extensible.
  • It facilitates you to write minimal lines of codes for UI related functions.
  • It provides cross-browser support.
The $() function is an alias of jQuery() function. It is used to wrap any object into jQuery object which later facilitates you to call the various method defined jQuery object. You can pass a selector string to $() function, and it returns a jQuery object which contains an array of all matched DOM elements.
$(document).ready(function() { $("p").css("background-color", "pink"); });