Created
May 1, 2014 10:45
-
-
Save gilliek/0f5053d390372355083a to your computer and use it in GitHub Desktop.
Just a basic template for jQuery plugins.
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
/* ======================================================================== | |
* jQuery Plugin Template: <+FILENAME+>.js v<+MAJOR+>.<+MINOR+>.<+PATH+> | |
* ======================================================================== | |
* Copyright <+YEAR+> <+AUTHOR+> | |
* Licensed under <+LICENSE+> | |
* (<+LICENSE_URL+>) | |
* ======================================================================== */ | |
(function($) { | |
$.jQueryPluginTemplate = function(element, options) { | |
var defaults = { | |
<+OPTIONS+> | |
} | |
var plugin = this; | |
plugin.settings = {} | |
plugin.init = function() { | |
plugin.settings = $.extend({}, defaults, options); | |
} | |
plugin.init(); | |
} | |
$.fn.jQueryPluginTemplate = function(options) { | |
return this.filter("<+TAGS+>").each(function() { | |
new $.jQueryPluginTemplate(this, options); | |
} | |
}); | |
} | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment