use requestAnimationFrame
sidebar animation