These methods tend to come in pairs when you’re working within the animation queue.
When you use the animate
and show
, hide
, slideUp
, etc effect methods, you’re adding a job on to the fx
queue.
By default, using queue
and passing a function, will add to the fx
queue. So we’re creating our own bespoke animation
step:
As I said though, these methods come in pairs, so anything you add using queue
, you need to dequeue
to allow the process to continue. In the code above, if I chained more animations on, until I call $(this).dequeue()
, the subsequent animations wouldn’t run:
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛