javascript - Is jQuery.off() needed when you use one()? -


if bind event handler one() (i want run once), still need unbind off() after event handler finishes?

$(el).one('transitionend', function(e){   $(el).off('transitionend');                               necessary? }); 

no, $.off() not needed @ all. once event fires once, handler removed.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -