JavaScript Coding Standards

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
Revision as of 04:18, 27 November 2009 by Orv Dessrx (talk | contribs) (Created page with '== Inline JavaScript == Inline JavaScript - e.g. the use of HTML attributes such as: onclick, onmouseover, onmouseout, etc - is an outright no-no. Do NOT do this. Instead, opt ...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Inline JavaScript

Inline JavaScript - e.g. the use of HTML attributes such as: onclick, onmouseover, onmouseout, etc - is an outright no-no. Do NOT do this. Instead, opt for event binding.

jQuery

The Brotherhood standardizes on the jQuery library. All JavaScript should be written using jQuery; either using Core jQuery, jQuery plugins, or DJB created jQuery plugins.

Script Inclusion

Including JavaScript within script tags in the HTML is not advised. Use an external file where possible. This allows the individual files to be cached by browsers independent of the HTML file.