Last active
          August 29, 2015 14:22 
        
      - 
      
 - 
        
Save JordanDelcros/0d44bb5ee1083f57a162 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Jordan Delcros renamed this gist
Jul 30, 2015 . 1 changed file with 3 additions and 0 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,3 +1,6 @@ /* Must easy and elegant way to create classes or complex objects in JavaScript */ (function( window, document ){ function Class( options ){  - 
        
Jordan Delcros revised this gist
May 29, 2015 . 1 changed file with 20 additions and 22 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,35 +1,33 @@ (function( window, document ){ function Class( options ){ if( this instanceof Class ){ return Class.fn.init(options); } else { return new Class.fn.init(options); }; }; Class.fn = Class.prototype = { constructor: Class, init: function( options ){ return this; }, myMethodA: function(){}, myMethodB: function(){} }; Class.fn.init.prototype = Class.fn; window.Class = Class; })(window, document);  - 
        
Jordan Delcros renamed this gist
May 29, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. - 
        
Jordan Delcros created this gist
May 29, 2015 .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,35 @@ (function( window, document ){ // The Class function Class( options ){ if( this instanceof Class ){ return Class.fn.init(options); } else { return new Class.fn.init(options); }; }; Class.fn = Class.prototype = { constructor: Class, init: function(options){ return this; }, myMethodA: function(){}, myMethodB: function(){} }; Class.fn.init.prototype = Class.fn; window.Class = Class; })(window, document);