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.
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?
<a href=”http://www.globalguideline.com/”>Global GuideLine</a>
35. What is jQuery plugin and what is the advantage of using plugin?
36. Can we use protocol less URL while referencing jQuery from CDNs?
Yes. Below code is completely valid.
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.