[jQuery] How to bind an event to a function of a class?

[jQuery] How to bind an event to a function of a class?

Hi Guys,
How can i bind/unbind an event to a specific function of a class?
e.g.
class {
somecallback() {
},
somefunc() {
$(document).keypress(this.somecallback);
},
otherfunc() {
$(document).unkeypress(this.somecallback);
}
}
Is this possible?
Thanx,
Gilles
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/