- Back to Home »
- Jquery - Tips & Tricks
Posted by :
Unknown
Friday, September 30, 2011
- Use min version of jquery (jquery.min.js) always, it is compressed and improves performance.
- For jquery IntelliSense use vsdoc.js e.g . currently available version is jquery-1.5-vsdoc.js. Download it from http://damianedwards.com/files/jquery/jquery-1.5-vsdoc.js . This is very useful and helps you while writing jquery functions.
- CDN hosted jquery - This is the recommended version of jQuery to use for your application. The code in here should be stable and usable in all modern browsers.
- jquery shorthand - instead of using full syntax for initializing jquery function you can use shorthand which is very quick and easy to understand
Full syntax -
$(document).ready(function ()
{
// ...
});
Shorthand syntax -
$(function ()
{
// ...
});
- jsfiddle - it is very useful online page where you can check any jquery functions.
- Link http://jsfiddle.net/