Closed mwcz closed 9 years ago
I think it is not needed when queue is set to false, but I am not hundred percent sure about it. Need to test it.
Ah, cool, learned something new. I don't know a lot about how jQuery handles animations. After looking into it and doing some testing, I don't think this PR is helpful at all.
From the docs it sounds like...
stop()
stops the currently-running animationstop(true)
stops the currently-running animation and clears any queued animationsanimate({queue: false})
begins the animation immediatelyIt sounds like queue: false
won't stop any prior animations from running, but it should cause the new anim to run right away. I would think that stop(true)
might be helpful, but after testing it it looks like autohidingNavbar already behaves perfectly.
I tested it by setting animationDuration
to 1000, then scrolling up and down rapidly to see if the animations stack up and cause jittering. It looked great though! No need for change.
Thanks for testing it!
I think it's good practice to use jQuery's
stop
to cancel any current/pending animations before starting a new animation. It keeps them from stacking.I honestly didn't do any testing before adding this, so I don't know how much benefit it provides, but here it is anyway! :)