Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (21 sloc) 0.484 kb
80c30ed @shichuan added more object creation patterns
authored
1 <!doctype html>
2 <html lang="en">
f1b4f9a Proper indentation using tabs (both HTML and JS)
Lars Kappert authored
3 <head>
4 <title>JavaScript Patterns</title>
5 <meta charset="utf-8">
6 </head>
7 <body>
8 <script>
9 /* Title: Declaring Dependencies
10 Description: it's good to declare the modules your code relies on at the top
11 */
80c30ed @shichuan added more object creation patterns
authored
12
f1b4f9a Proper indentation using tabs (both HTML and JS)
Lars Kappert authored
13 var myFunction = function () {
14 // dependencies
15 var event = YAHOO.util.Event,
16 dom = YAHOO.util.dom;
17
18 // use event and dom variables
19 // for the rest of the function...
20 };
21 </script>
22 </body>
80c30ed @shichuan added more object creation patterns
authored
23 </html>
Something went wrong with that request. Please try again.