I have a bug in my jQuery/animate.css code. The problem is an event handler that is called twice but it should be executed only one. You can find the code here, the important line is below:
JSFiddle
$('#tiles').addClass(tiles_in).one(animation_end, function() {
// called twice
log('tiles in');
});
In order to reproduce the bug, follow these steps:
change_tilestiles outtiles indiv, here are the new logs
tile out // normaltiles in // why ?Tiles in should not be called again as the event is one(). And the documentation says "The .replaceWith() method removes all data and event handlers associated with the removed nodes." So I don't know.
why ?
A call to .one() is within first .one() event handler where the the event is attached to the same selector #tiles
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With