Skip to content

Instantly share code, notes, and snippets.

@dncrht
Created December 28, 2013 11:59
Show Gist options
  • Save dncrht/8158694 to your computer and use it in GitHub Desktop.
Save dncrht/8158694 to your computer and use it in GitHub Desktop.
/**
* Clase de ejemplo o referencia para usarse con AbstractView.
*/
View = (function(_super) {
__extends(View, _super);
function View() {
return View.__super__.constructor.apply(this, arguments);
}
View.prototype.events = {
'click .my_link': 'clickEnLink',
'scroll document': 'efectosDeScroll'
}
View.prototype.initialize = function() {
$('.my_link').css('color', 'red')
}
View.prototype.clickEnLink = function(event) {
$(event.currentTarget).css('color', 'blue')
}
View.prototype.efectosDeScroll = function() {
console.log('scroll')
}
return View;
})(AbstractView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment