简体   繁体   English

jQuery动画队列:false不能同时制作动画

[英]jQuery animate queue: false not working to make animations simultaneous

I've used the jQuery queue modifier to make animations happen simultaneously before, but for some reason I can't get it working this time. 我已经使用了jQuery queue修饰符来使动画同时发生,但由于某些原因我这次无法使​​它工作。

The URL of the page in question is http://fretfast.com - when you click "notifications" at the top left, you'll see that first the bar expands sideways and then the "notifications" bar expands to fit it, and the same thing happens with the height animation. 有问题的页面的URL是http://fretfast.com - 当你点击左上角的“通知”时,你会看到第一个栏向侧面展开,然后“通知”栏展开以适应它,并且高度动画也会发生同样的事情。

Here is how I'm trying to do it: 这是我试图这样做的方式:

n.animate({width: em2px(35)+'px'}, {queue: false, duration: speeds['fast']/1.5});
nc.animate({width: em2px(35)+'px'}, {queue: false, duration: speeds['fast']/1.5});

Where n is the variable for the "notifications" title bar and nc is the variable for the notification container that expands first. 其中n是“notifications”标题栏的变量, nc是首先展开的通知容器的变量。 Any idea what's wrong? 知道什么是错的吗?

You probably have Transition properties in your CSS, on the selector you are trying to animate. 您可能在CSS中,在您尝试设置动画的选择器上有Transition属性。 Took me forever to figure this out, but apparently, CSS Transitions force the animation to either lag, or happen after all other animations, can anyone clarify or confirm this? 让我永远明白这一点,但显然,CSS Transitions迫使动画要么滞后,要么在所有其他动画之后发生,任何人都可以澄清或证实这一点吗?

Using jQuery animations and CSS animations together can be tricky, anyone have any insight into this? 一起使用jQuery动画和CSS动画可能很棘手,任何人都对此有任何见解? Tips? 提示?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM