Issue on Adding Animation Between Adding and Removing Two Classes
Can you please take a look at this demo and let me know why I am not able to generate smooth transition (something like Smooth Scroll) between adding and removing two classes fixed-top and fixed-bottom while I already added following css roles into them? -webkit-transition: all 3s ease; -moz-transition: all 3s ease; -o-transition: all 3s ease; transition: all 3s ease; var lastScrollTop = 0; $(window).scroll(function(event) { var st = $(this).scrollTop(); if (st > lastScrollTop) { if (st > 500) { $('.box').removeClass("fixed-bottom").addClass("fixed-top"); } } else { if (st < 500) { $('.box')