我有一个网页,从顶部滑动带来另一个页面...我已经使用jquery动画实现了这个...现在我的查询是如何知道animate()方法的进度百分比...喜欢从页面开始滑动到完成
谢谢
您可以使用step-callback,它在动画选项中传递以在每个步骤上执行函数.你可以调查一下.
$('#myElement').animate({/*Your animation options.*/}, {
step: function(current_number){
/* measure stuff using the first argument passed to this function */
}
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9873 次 |
| 最近记录: |