animate(): custom animation

Animate numeric CSS values. For anything fancy CSS transitions are smoother.

jQuery · animate(): custom animationBeginner
$('#box').animate({ left: '200px', opacity: 0.5, height: '+=50' }, 600, function () {
  console.log('finished');
});

$('html, body').animate({ scrollTop: $('#section').offset().top - 70 }, 500);

$('#box').stop(true).animate({ width: 300 }, 200);     // stop the running one first
animateeasingcss