Last active
October 13, 2015 07:07
-
-
Save cmalven/4157659 to your computer and use it in GitHub Desktop.
Revisions
-
cmalven revised this gist
May 22, 2014 . 1 changed file with 37 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,55 +1,57 @@ function MyObject(options) { /***************************************** /* PRIVATE VARS /****************************************/ var self = { } /***************************************** /* PUBLIC VARS /****************************************/ self.defaults = { } /***************************************** /* PRIVATE METHODS /****************************************/ var init = function() { updateSettings(); addEventListeners(); } var updateSettings = function() { if (typeof options == 'object') { self.settings = $.extend(self.defaults, options); } else { self.settings = self.defaults; } } var addEventListeners = function() { } /***************************************** /* PUBLIC METHODS /****************************************/ self.myFunction = function() { } // Initiate init(); // Return the Object return self; } -
cmalven revised this gist
Jun 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function MyObject(options) { self.defaults = { } /***************************************** -
cmalven renamed this gist
Jun 27, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
cmalven created this gist
Nov 27, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,55 @@ function MyObject(options) { /***************************************** /* PRIVATE VARS /****************************************/ var self = {} /***************************************** /* PUBLIC VARS /****************************************/ self.defaults = { }; /***************************************** /* PRIVATE METHODS /****************************************/ var init = function() { updateSettings(); addEventListeners(); } var updateSettings = function() { if (typeof options == 'object') { self.settings = $.extend(self.defaults, options); } else { self.settings = self.defaults; } } var addEventListeners = function() { } /***************************************** /* PUBLIC METHODS /****************************************/ self.myFunction = function() { } // Initiate init(); // Return the Object return self; }