Hello everyone,
Maybe it's a dumb question, but I've stumbled at this and can't seem to find the answer. I have the following code:
var pager = {
$btnNext: false,
// here "this" points to the "pager" object
init: function(id){
this.$btnNext=$('.next',$('#'+id);); // find a button
this.$btnNext.click(this.next); // register the object's "next()" method as a handler to the "click" event
},
// here "this" points to the button
next: function(){
// I need to get access to the $btnNext property
this.$btnNext.unbind('click'); // this doesn't work
},
}
Any suggestions?
Sorry for my bad English.