Thanks, for now I'm just using 1 where I conceptually want to use 0.  I
thought it was just odd that the initial animation treated 0 as the duration
in ms, but the hover-induced animation appeared to treat 0 as the boolean
false.


dave.methvin wrote:
> 
> 
>> Class zero gets initially set to 40% opacity over 0ms.  Upon hover over
>> the
>> opacity should get set to 100% over 0ms (immediately), but instead the
>> animation takes the default duration to complete.
>>
>> Class one is the same as class zero, but the haver animation takes one
>> millisecond to execute and works much like class zero was originally
>> intended.
> 
> I haven't looked at the animate code, but the || operator is probably
> used to assign the default value. The behavior of that operator means
> that a value of numeric 0 gets the default.
> 
> If you are using your own variable for the duration and want to make
> sure the default is never used, just use "|| 1" to make sure it is at
> least 1 millisecond.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/bug-with-animate-and-a-duration-of-0-milliseconds--tp15413274s27240p15425457.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to