jQuery interview questions and answers – Part4

31. Which version of jQuery should you use – jquery.js or jquery.min.js? Why?
“.min” refers to the ‘minified’ version of a script or stylesheet. Minification removes all excess whitespace and unnecessary characters from the script and makes it load faster on actual live pages. Thus, the minified version of jQuery – jquery.min.js – is called the ‘deployment’ version. The non-minified jquery.js version, on the other hand, is easier to edit, and thus, is called the ‘production’ version.
You would use the production version while making your web pages, deployment version for live pages.

32. What is the advantage of using minimized version of jQuery?
Efficiency of web page increases when minimized version of jQuery is used.min.js file will be more than 50% less than the normal js file. Reduction in the file size makes the web page faster.

33. Why is jQuery 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.
* jQuery is great library for developing ajax based application.
* It helps the programmers to keep code simple and concise and reusable.
* jQuery library simplifies the process of traversal of HTML DOM tree.
* jQuery can also handle events, perform animation, and add the Ajax support in web applications.

34. Explain how jQuery Works?
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”> // You can write the code here </script>
<a href=”http://www.globalguideline.com/”>Global GuideLine</a>

35. What is jQuery plugin and what is the advantage of using plugin?
A plug-in is piece of code written in a standard JavaScript file. These files provide useful jQuery methods which can be used along with jQuery library methods. jQuery plugins are quite useful as its piece of code which is already written by someone and re-usable, which saves your development time.

36. Can we use protocol less URL while referencing jQuery from CDNs?
Yes. Below code is completely valid.
<script type=”text/javascript” src=”//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script>

37. Do you have plans for a new jQuery plug-in or something else we should look out for? Where to from here for the imgPreview plugin?
I’m not sure, I’m largely unpredictable when it comes to jQuery; I’m still learning! If anyone has any requests feel free to forward me them! As for the imgPreview plugin I hope to keep it under constant development; any contributions or suggestions are welcomed!

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

39. Where jQuery code is getting executed?
jQuery code is getting executed on a client browser.

40. Is jQuery is a replacement of JavaScript?
No, jQuery is not a replacement of JavaScript.

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

Leave a Reply

Your email address will not be published. Required fields are marked *

− two = 4

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter