Skip to content

Instantly share code, notes, and snippets.

View brianegan's full-sized avatar

Brian Egan brianegan

View GitHub Profile
// At a glance you can see which global objects are being imported, these are the local variable names you will use in your script
(function(z, $) { // encapsulate in a closure
// Use strict is within scoped function so that it only applies to this code block
"use strict"; // Prevents common errors and bad practices, by catching them at runtime.
var proto; // The var that will store the reference to the prototype for our widget
/**
* Description of what the widget does
*
* @example
* z.myWidget(selector, {