How many milliseconds do "slow", "normal", and "fast" represent in jQuery?
Asked Answered
D

3

62

jQuery allows use of the string values "slow", "normal", and "fast" in animations (e.g.: $('#example').fadeOut('slow');). How many milliseconds do each of these values represent?

Duron answered 17/9, 2010 at 19:27 Comment(5)
I dont think normal is a special arguement. But since you supplied, other than 'slow' / 'flow' , it considered 400.Syllogistic
@Syllogistic - no need to make invalid assumptions. I did research the docs, and unless they've been updated since I asked this question, the millisecond values were not mentioned.Duron
I didnt get you. Where am I making invalid assumption ? :OSyllogistic
You said, "it deserves -1 for no research." But I did research.Duron
I removed that :) I just said what I thought.Syllogistic
E
96

600, 400 and 200, respectively "slow", "normal", "fast". All in the docs

Episodic answered 17/9, 2010 at 19:29 Comment(2)
Thanks, didn't see it in there. Appreciate the reference!Duron
Just to add, there's nothing in special in normal like slow or fast. From the same link, If any other string is supplied, or if the duration parameter is omitted, the default duration of 400 milliseconds is usedSyllogistic
C
11

600ms, 400ms and 200ms respectively.

Source

Cauda answered 17/9, 2010 at 19:28 Comment(4)
Thanks for adding the link. Unfortunately, it only explains the speeds of fast and slow, not normal.Duron
Actually it is 600, 400, 200 respectively =)Aquino
@Matt Huggins, I think "normal" is default value, which is 400. You can take a look at the source yourself (code.jquery.com/jquery-1.4.2.js) line 5885.Aquino
if I recall, the docs only specify slow and fast, and any other value returns 400. So, .fadeOut('monkeyFeces') will fade out at 400 ms. (Try it)Fingertip
A
6

I would be original and answer 600, 400, 200 respectively. Since higher number of milliseconds means slower speed =) All in the source

Aquino answered 17/9, 2010 at 19:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.