Skip to content

Instantly share code, notes, and snippets.

View ansco05069's full-sized avatar

ansco0506 ansco05069

View GitHub Profile
!function(window, document, undefined){
plugins = [];//Plugin storage object
function constructorObject(options){//object constructor
var self = this; //store itself for later
plugins.forEach(function(plugin){
plugin(self, options);//pass this instance of the constructed object to the plugin
//the options used to construct it are also passed as well
!function(window, document, undefined){
plugins = [];//Plugin storage object
function constructorObject(options){//object constructor
var self = this; //store itself for later
plugins.forEach(function(plugin){
plugin(self, options);//pass this instance of the constructed object to the plugin
//the options used to construct it are also passed as well