Created
May 15, 2012 13:30
-
-
Save rodaine/2701800 to your computer and use it in GitHub Desktop.
JavaScript: jQuery Plugin Boilerplate [$.method()]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based off Nettuts+ article by Jonathan Cutrell: | |
// "14 Reasons Why Nobody Used Your jQuery Plugin" | |
// http://goo.gl/yx8up | |
;(function($, window, undefined){ "use strict"; | |
if (!$.myPlugin) $.myPlugin = function(opts) { | |
var defaults = { | |
//plugin defaults | |
}; | |
var options = $.extend(defaults, opts || {}); | |
//plugin logic... | |
}; | |
})(jQuery, window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment