我需要在存储在数据库中的时间轴中在jQuery中制作一系列动画。 我正在使用函数名称(animate,slide,fade ...),函数的选项/参数以及函数的回调来存储此信息。
我知道jQuery确实有.queue方法,但我真的不知道如何利用它(我想更多是因为我从未使用它)。
那么,jQuery动画队列和封装在回调中的动画函数有什么区别? 考虑性能,最好的方法是什么?
I need to make a sequence of animations in jQuery based in a timeline that is stored in a database. I'm storing this information with the name of function (animate, slide, fade...), the options/arguments of function and the callback of function.
I know jQuery does have the .queue method, but I really don't know how to take advantage of it (I think is more because I never used it).
So, what is the difference between a jQuery animation queue and animate functions encapsulated in callbacks? Thinking about performance, what is the best way?
最满意答案
这篇文章是在不久前写的,但不仅如此,还可以提供关于这个问题的足够的想法。
This article was written some time ago but more than certain that can still provide enough ideas about this question.
更多推荐
发布评论