Improvement and speed up tips for JQuery
Posted by admin on September 15 2010 08:59:51

1. It's good idea when you develop some application with jQuery to use cheat sheet.

On the net you could find cheat sheets for jQuery. Here are listed some cheat sheets for jQuery:

  1. Several JavaScript libraries are hosted by Google. There are several advantages to loading them from Google instead of from your server. Saves on bandwidth, load very quickly from Google's and most importantly it'll already be cached if the user has visited a site which delivers it from Google Code.


Here is an example for loading of jQuery from Google:

<script src="" type="text/javascript"></script>

3. Keep DOM manipulation to a minimum

4. IDs instead of classes wherever possible

jQuery makes selecting DOM elements using classes as easy as selecting elements by ID used to be, so it's tempting to use classes much more liberally than before. It's still much better to select by ID though because jQuery uses the browser's native method (getElementByID) to do this and doesn't have to do any of it's own DOM traversal, which is much faster.