A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

5 Tips for Better jQuery Code

#1: Use data method instead of storing data inside the DOM.
#2: Take advantage of jQuery’s built-in custom selectors.
#3: If you are Manipulating the DOM a lot, use livequery.
#4: Use jQuery form plugin to submit files via Ajax.
#5: Use classes as flags.

Go here to read the complete post.

This entry was posted in General and tagged , . Bookmark the permalink.

One Response to 5 Tips for Better jQuery Code

  1. que says:

    that’s correct livequery is the trick when dealing with DOM on runtime, or on the fly
    http://brandonaaron.net/docs/livequery/

Leave a Reply to que Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>