How to use JQuery
To load local jQuery file
Ideally this markup is kept in under <head></head> tag of your web page, however we are free to keep anywhere you want.
What is the difference between jQuery-x.x.x.js and jQuery.x.x.x-min.js
In terms of functionality, there is no difference between the jQuery-x.x.x.js and jQuery-x.x.xmin.js (also called minified version). However this can play a vital role in the performance of the web page.
How it affects the performance?
To understand it, lets take example of jQuery 1.4.4 version of .js file. jQuery-1.4.4.js file size is 178 KB as against its minified version jQuery-1.4.4-min.js that is only 76.7 KB in size. So when your page loads in the client's browser if you are not using minified version, it loads 178 KB file that takes more time to load than 76.7 KB.
Which version of jQuery file should be used?
In most of the recent releases so far, the core functionality of jQuery remains same however some more cool and better features are added. Ideally you should use the latest jQuery files available on the jQuery.com website. By doing this you ensure that your earlier functionality will still work and you can use new features available as part of the new release.
Views: 4235 | Post Order: 4