aboutsummaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/coding_standards/javascript_coding_standards.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/documentation/coding_standards/javascript_coding_standards.txt b/documentation/coding_standards/javascript_coding_standards.txt
index 7d3b842ec..9939e80ab 100644
--- a/documentation/coding_standards/javascript_coding_standards.txt
+++ b/documentation/coding_standards/javascript_coding_standards.txt
@@ -1,2 +1,13 @@
*** JAVASCRIPT CODING STANDARDS ***
+* Same formatting standards as PHP.
+
+* All functions should be in the elgg namespace.
+
+* Function expressions should end with a semi-colon:
+
+ elgg.ui.toggles = function(event) {
+ event.preventDefault();
+ $(target).slideToggle('medium');
+ };
+