Is there any method to unbind an event that has been bound with one()? Sort of like unone()
See Question&Answers more detail:osIs there any method to unbind an event that has been bound with one()? Sort of like unone()
See Question&Answers more detail:osQuote 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);
}