Skip to content

Instantly share code, notes, and snippets.

View busticated's full-sized avatar

Busticated busticated

View GitHub Profile
@busticated
busticated / gist:1348409
Created November 8, 2011 17:14 — forked from jrburke/basic.js
possible jquery plugin boilerplate
(function(root, factory) {
if (typeof exports === 'object') {
// Node/CommonJS
factory(require('jquery'));
} else if (typeof define === 'function' && define.amd) {
// AMD. Use a named plugin in case this
// file is loaded outside an AMD loader,
// but an AMD loader lives on the page.
define('myPlugin', ['jquery'], factory);
} else {