排队jQuery动画的最佳方法(Best way to enqueue jQuery animations)

编程入门 行业动态 更新时间:2024-10-17 21:23:39
排队jQuery动画的最佳方法(Best way to enqueue jQuery animations)

我需要在存储在数据库中的时间轴中在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.

更多推荐

本文发布于:2023-08-01 02:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1350605.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   动画   jQuery   enqueue   animations

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!