今天,当我在阅读jQuery
.animate()
方法的新功能的时候,我遇到了两个我认为有同样动作的选项.
这些选项完成并完成.根据文档,它们是在动画完成时运行的功能.
complete Type: Function() A function to call once the animation is complete.
和:
done Type: Function( Promise animation,Boolean jumpedToEnd ) A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
现在我的问题是两者之间有什么区别?