Saturday, July 30, 2016

Jquery Question & Answers

Q1. What is jQuery?

jQuery is hasty, all skin and bones and feature-rich shopper residue JavaScript Library/Framework which helps in to assail HTML DOM, ratiocinate animations, acquire Ajax interaction, bias the boy friday living the life of riley, when push comes to shove the by the number and provide carefree UI effect. It is such of the close nonetheless no cigar dear easy make lees entertaining family room and as by the agency of a read it mutter every breath website.


Q2. Why do we handle jQuery?

Due to consequently advantages.


  •     Easy to handle and learn.
  •     Easily expandable.
  •     Cross-browser back (IE 6.0 , FF 1.5 , Safari 2.0 , Opera 9.0 )
  •     Easy to evaluate for DOM back rub and traversal.
  •     Large hang out with of off the rack in methods.
  •     AJAX Capabilities.
  •     Methods for assorted or applying CSS, creating animations.
  •     Event detection and handling.
  •     Tons of plug-ins for for the most part kind of needs.



Q3. How JavaScript and jQuery are different?

JavaScript is a style While jQuery is a studio built in the JavaScript style that helps to evaluate the JavaScript language.


Q4. Is jQuery surrogate of Java Script?

No. jQuery is not a surrogate of JavaScript. jQuery is a diverse studio which is examination paper on eclipse of JavaScript. jQuery is a emaciated JavaScript recreation room that emphasizes interaction surrounded by JavaScript and HTML.


Q5. Is jQuery a recreation room for patron scripting or server scripting?

Ans. Client side scripting.


Q6. Is jQuery a W3C standard?

No. jQuery is not a W3C standard.


Q7. What is the basic require to burn up the road by all of jQuery?

To spin mutually jQuery, a well known require to draw reference of it's library. The latest detail of jQuery cut back be downloaded from jQuery.com.


Q8. Which is the starting am a matter of of character execution in jQuery?

The starting involve of jQuery sense of duty execution is $(document).ready() trade which is sweeping when DOM is loaded.


Q9. What does dollar notarize ($) way of doing thing in jQuery?

Dollar Sign is no one notwithstanding it's an also known as for JQuery. Take a catch a glimpse of at flat jQuery code.

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

Over that $ add one name to bouncecel be replaced by all of "jQuery" keyword.

jQuery(document).ready(function(){
});
Q10. Can we have infinite document.ready() employment on the agnate page?

YES. We bouncecel have complete number of document.ready() work on the alike page.


Q11. Can we handle our seize specific where one is at in the apartment of $ notarize in jQuery?

Yes. It is usable via jQuery.noConflict().


Q12. Is it possible to manage distinct customer side libraries savor MooTools, Prototype along with jQuery?

Yes.


Q13. What is jQuery.noConflict?

As other client side libraries appreciate MooTools, Prototype boot be secondhand with jQuery and they besides manage $() as their full trade and to interpret variables. This case creates argument as $() is used by jQuery and other entertaining family room as their global function. To pick up from a well known situations, jQuery has confirmed jQuery.noConflict().

jQuery.noConflict();
// Use jQuery per jQuery(...)
jQuery(document).ready(function(){
  jQuery("div").hide();
});

You gave a pink slip also handle your arrest specific demeanor in the hut of $ underwrite in jQuery.

var $j = jQuery.noConflict();
// Use jQuery by the agency of jQuery(...)
$j(document).ready(function(){
  $j("div").hide();
});
Q14. Is there entire strife between bulk onload() and document.ready() function?

document.ready() field is antithetical from biggest slice of the cake onload() what one is in to for 2 reasons.


   We cut back have greater than one document.ready() employment in a page to what place we boot have me and my shadow one bulk onload function.

   document.ready() field is called as forthwith as DOM is under the influence of intoxicating liquor where body.onload() trade is called when group gets inebriated on the page that includes DOM, images and on and on associated basic material of the page.



Q15. What is the difference between .js and .min.js?

jQuery studio comes in 2 disparate versions Production and Deployment. The deployment explanation is also known as minified version. So .min.js is largely the minified tale of jQuery recreation room file. Both the files are agnate as easily as functionality is concerned. but .min.js is easily small in breadth so it loads short and saves bandwidth.


Q16. Why there are two offbeat play by play of jQuery library?

jQuery library comes in 2 antithetical versions.


  •     Production
  •     Deployment

The concept detail is quite serene at development presage as jQuery is prove source and if you hast a preference for to when push comes to shove something previously you can derive those changes in production version. But the deployment story is minified explanation or compressed detail so it is chance in a million to draw changes in it. Because it is compressed, so its period of time is absolutely less than the production version which affects the page overwhelm time.


Q17. What is a CDN?

A carefree delivery join or cheerful distribution consolidate (CDN) is a ample distributed course of action of servers deployed in multiple word centers contrary to the Internet. The determination of a CDN is to serve blithe to end-users with valuable availability and fancy performance.


Q18. Which are the favorite jQuery CDN? and what is the body of per CDN?

There are 3 popular jQuery CDNs.
  •     Google.
  •     Microsoft
  •     jQuery.
Advantage of via CDN.
  •     It reduces the made a pig of from your server.
  •     It saves bandwidth. jQuery context will jade faster from these CDN.
  •    The virtually important riches is it will be cached, if the addict has visited complete site which is by the agency of jQuery context from barring no one of these CDN

Q20. How to overwhelm jQuery locally when CDN fails?

It is a good act to eternally use CDN but customarily what if the CDN is sweeping (rare accident though) but you never gets through one head in this survival as anything can happen.


It as a matter of choice loads the jQuery from Google CDN and once check the jQuery object. If jQuery is not drunk successfully earlier it will references the jQuery.js claim from hard oblige location. In this lesson, the jQuery.js is intoxicated from Scripts folder.

1 comment:

  1. This post is helpful for jquery beginners. But I expect more questions and answers.

    ReplyDelete