Skip to content

Instantly share code, notes, and snippets.

@gonzaloruizdevilla
Created February 4, 2013 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gonzaloruizdevilla/4710559 to your computer and use it in GitHub Desktop.
Save gonzaloruizdevilla/4710559 to your computer and use it in GitHub Desktop.
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