Jquery unbind events bound with one()
Quote from JQuery.com:
You cannot unbind a listener created using
.one()
. If you want to be able to unbind something that has to occur only once but still be able to unbind it before it occurs, you have to use.bind()
Something like:
$("#element").on("click",function(event){
//do stuff here
$(this).off(event);
}
According to a comment on the doc page:
Note: you cannot unbind a listener created using .one(). If you want to be able to unbind something that has to occur only once but still be able to unbind it before it occurs, use the example provided for unbinding an event after it's called, and bind it using .bind().
http://api.jquery.com/one/