Interview Questions Jquery

Jquery


1. What is jQuery?
jQuery is fast, lightweight and feature-rich client side JavaScript Library/Framework which helps in to traverse HTML DOM, make animations, add Ajax interaction, manipulate the page content, change the style and provide cool UI effect. It is one of the most popular client side library and as per a survey it runs on every second website.

2. Why do we use jQuery?
Due to following advantages.

? Easy to use and learn.
? Easily expandable.
? Cross-browser support (IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)
? Easy to use for DOM manipulation and traversal.
? Large pool of built in methods.
? AJAX Capabilities.
? Methods for changing or applying CSS, creating animations.
? Event detection and handling.
? Tons of plug-ins for all kind of needs.

3. 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.

4. Is jQuery replacement of Java Script?
No. jQuery is not a replacement of JavaScript. jQuery is a different library which is written on top of JavaScript. jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML.

5. Is jQuery a library for client scripting or server scripting?
Client side scripting.

6. Is jQuery a W3C standard?
No. jQuery is not a W3C standard.

7. What is the basic need to start with jQuery?
To start with jQuery, one need to make reference of it's library. The latest version of jQuery can be downloaded from jQuery.com.

8. Which is the starting point of code execution in jQuery?
The starting point of jQuery code execution is $(document).ready() function which is executed when DOM is loaded.

9. What does dollar sign ($) means in jQuery?
Dollar Sign is nothing but it's an alias for JQuery. Take a look at below jQuery code. 

$(document).ready(function(){
});
Over here $ sign can be replaced with "jQuery" keyword.

jQuery(document).ready(function(){
});

10. Can we have multiple document.ready() function on the same page?
YES. We can have any number of document.ready() function on the same page.