You can bind to the transitionend event (actually):
$("body").on( "transitionend MSTransitionEnd webkitTransitionEnd oTransitionEnd", function() { $(this).removeClass("start"); } );
If you want to implement a delay, you can queue () do the class delete operation:
$("body").on( "transitionend MSTransitionEnd webkitTransitionEnd oTransitionEnd", function() { $(this).delay(1000).queue(function() {
Note: on () only exists with jQuery 1.7, if you are using an older version, you will have to use bind () instead of the code above.
Frรฉdรฉric hamidi
source share