Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created November 12, 2012 21:55

Revisions

  1. ahoward created this gist Nov 12, 2012.
    20 changes: 20 additions & 0 deletions js-class.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    //
    var Grid = new Function();

    Grid.initialize = function(){
    var args = Array.prototype.slice.apply(arguments);

    var grid = new Grid();

    grid.initialize.apply(grid, args);

    return grid;
    };


    Grid.prototype.initialize = function(){
    var args = Array.prototype.slice.apply(arguments);
    var grid = this;

    // initialize that bad boy...
    };