I am fading elements one by one but it seems it all fades at once.
How can I fade elements one by one. Only if one fades completely, should the second start fading.
I loop and fade it like this
$(ele).fadeIn('slow');
fadeIn has a callback that executes when fading is completed. Add to every element the class elemX, where x is the order of fading. Then use the following code:
startFading(1);
function startFading(order) {
$(".ele" + order).fadeIn('slow', function() {
if (order < orderMax) {
startFading(order+1);
}
});
}
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