Last active
March 22, 2016 10:10
-
-
Save davelab/1fdec79abaa15ec6f551 to your computer and use it in GitHub Desktop.
jQuery Plugin Snippet
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
;(function($, window) { | |
'use-strict'; | |
var pluginName = "", | |
defaults = {}; | |
/** | |
* plugin constructor | |
* @param {object} parentElement the DOM of initialized plugin | |
* @param {object} options plugin config options | |
*/ | |
function Plugin(parentElement, options) { | |
this.settings = $.extend({}, defaluts, options); | |
}; | |
$.fn[pluginName] = function(options){ | |
return this.each(function(){ | |
new Plugin(this, options); | |
}); | |
}; | |
})(jQuery, window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment