Created
February 4, 2013 23:00
-
-
Save gonzaloruizdevilla/4710559 to your computer and use it in GitHub Desktop.
This file contains 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 characters
moduleG = function () {}; | |
moduleG.prototype.data = dataArray; | |
moduleG.prototype.init = function () { | |
this.addTable(); | |
this.addEvents(); | |
}; | |
moduleG.prototype.addTable = function () { | |
var template = _.template($('#template').text()); | |
var html = template({'data' : this.data}); | |
$tbody.append(html); | |
}; | |
moduleG.prototype.addEvents = function () { | |
$('table').on('click', 'td', function () { | |
$(this).toggleClass('active'); | |
}); | |
}; | |
var modG = new moduleG(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment