Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (21 sloc) 484 Bytes
<!doctype html>
<html lang="en">
<head>
<title>JavaScript Patterns</title>
<meta charset="utf-8">
</head>
<body>
<script>
/* Title: Declaring Dependencies
Description: it's good to declare the modules your code relies on at the top
*/
var myFunction = function () {
// dependencies
var event = YAHOO.util.Event,
dom = YAHOO.util.dom;
// use event and dom variables
// for the rest of the function...
};
</script>
</body>
</html>