Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save benaskins/305341 to your computer and use it in GitHub Desktop.
Save benaskins/305341 to your computer and use it in GitHub Desktop.
(function($) {
$.fn.extend({
pluginName: function(options) {
// Initialise the class
new PluginClass(this, $.extend({}, $.fn.pluginName.defaults, options));
// Return this for chaining
return this;
}
});
$.fn.pluginName.defaults = {};
function PluginClass(element, options) {
var element = element,
options = options;
init();
function init() {
// Do stuff
};
};
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment