use requestAnimationFrame instead of jquery animate