Is it possible to unbind a listener from within the listener? I want to do this because I have a listener which determines the criteria of its own unbinding (e.g. when a certain key is pressed, the listener should unbind).
$input.on("keydown.listenerOne", function (press) {
if(press=="37"){
$input.off("keyup.listenerOne");
}
});