如何让我们的动画不是一开始就执行,点击之后才执行?

How to make our animation not to carry out at the beginning, only after clicking?

我希望在单击菜单按钮后制作该动画。我尝试了 iffunction,但没有成功。 Click here for code

像这样?

您需要将 menuAnim 代码移动到 click 侦听器中。

https://codepen.io/nisharg/pen/abvJxKL