rmurphey Adventures in JavaScript

jQuery Style Guide from Benjamin Sterling

7 Dec 2008 edit

Just wanted to call attention to two excellent posts by Benjamin Sterling: Better jQuery Code 1 and Better jQuery Code 2. He offers some must-have tips on style, form and best practices. Thanks to @foobar2k for the link.

One addition to his notes on caching selections by setting up references: I'm partial to giving references a variable name that starts with a dollar sign, like $links. For me, it serves as a good reminder that the variable is a reference to a jQuery object.