Skip to Content

jQuery

Important notes about javascript.

Using || in a namespace declaration.

var MyNamespace = MyNamespace || {};

This will establish a new empty object only if MyNamespace does not pre-exist. Very cool.

$(document).ready(MyNamespace.init);//drop this into .js file to get things rolling. Now I'm going to try some of this, only not in this page.