backbone.js – events, knowing what was clicked

Normally on an event bind, you would just use $(this), but I’m fairly sure Backbone views are set up so that this always refer to the view, so try this:

perpage: function(ev) {
   alert($(ev.target).text());
}

REALLY LATE EDIT: You probably want to use $(ev.currentTarget). See dicussion on pawlik’s answer below

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)