Skip to content

Instantly share code, notes, and snippets.

@markcarrrr
Last active August 29, 2015 13:56
Show Gist options
  • Save markcarrrr/8997561 to your computer and use it in GitHub Desktop.
Save markcarrrr/8997561 to your computer and use it in GitHub Desktop.
var GLOBAL_NAME = {};
;(function($, window, document){
'use strict';
var PLUGIN_NAME = this.PLUGIN_NAME = function(element, options){
this.element = $(element);
this.options = $.extend({}, this.options, options);
this.initialise();
};
PLUGIN_NAME.prototype = {
options: {},
initialise: function(){
this.FUNCTION_NAME();
},
FUNCTION_NAME: function(){
// DO SOMETHING
}
};
$.fn.pLUGIN_NAME = function(options){
new PLUGIN_NAME(this, options);
return this;
};
}).apply(GLOBAL_NAME, [jQuery, window, document]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment