jquery - How to reverse the animation using delay? -
i adding class div expand height. once height reached, making each of span
appear dealy.
when user clicks back, removing height of div. before need roll-back span fade last. (3,2,1)
how it?
here code :
$('button').click(function () { $('.parent').toggleclass('active'); $('.parent').on('animationend webkittransitionend', function() { $('span').each(function (i) { $(this).delay(i*1000).queue(function (next) { $(this).addclass('fadein'); next(); //used dequeue }); }); }) });
Comments
Post a Comment