JavaScript Coding Standards: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
(Adding categories)
m (Vexxtal Bot: Article underlinked, underlinked template added.)
Line 1: Line 1:
== Inline JavaScript ==
{{Underlinked}}== 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.
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.



Revision as of 08:29, 2 December 2009

You plan to take them on.. with just those?
This article does not contain very many links to other articles, which would be of use for easy navigation.
After editing is complete, please place a note on the article's talk page and remove this message.

== 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.