Skip to main content

Bug Tracker

Side navigation

#14644 closed bug (notabug)

Opened December 20, 2013 01:55AM UTC

Closed December 23, 2013 04:13PM UTC

Last modified December 28, 2013 07:13PM UTC

Animation speed depending on duration variable type

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hi all

I made a small example of a problem that I've hit for the second time; and I wanted to document it once more. I create a small jsfiddle which hopefully shows what I mean. I reported the same bug a year ago and unfortunately it was negated.

http://jsfiddle.net/Z8eNH/10/

http://bugs.jquery.com/ticket/13273

As I already knew this bug I had no problem to fix it, but I'm very curious if I'm really the only one to hit this twice; or if I'm so wrong about it's solution (see earlier bug report)!

If so, I shall be quiet and accept to need to convert numbers to actual number types, no matter where they've come from for animation durations!!!

Best regards

Attachments (0)
Change History (5)

Changed December 20, 2013 02:00AM UTC by anonymous comment:1

Sorry, some naming mistakes -> corrected demo version: jsfiddle.net/Z8eNH/12/

Changed December 22, 2013 07:36PM UTC by anonymous comment:2

I can't see the bug here. It works like documented. Duration requires a number or a string. If it is a string, you have to put in 'fast' or 'slow'. If you give anything else, it will fall back on it's default value of 400 ms.

A string of '2000' is not a valid value.

Changed December 23, 2013 04:13PM UTC by dmethvin comment:3

resolution: → notabug
status: newclosed

Agreed. If the value is a string it's a shorthand name and goes through the lookup like "slow".

Changed December 28, 2013 04:29AM UTC by anonymous comment:4

Thanks for taking another look at it. Just wanted to leave a short reply. window.setTimeout also accepts numbers in the form of a string. So for me it would feel naturaly if jQuery.animate duration would too. IMO it would not interfere with the current behaviour. At least I'd think this would be worth documenting. I know that most of the time the duration will be set somewhere in the code (thus beeing a true number type). I keep stumbling up on this one whenever I create a UI to test my js stuff; where I want to set the duration via an input field or a prompt.

Bye and Happy Holidays!

Changed December 28, 2013 07:13PM UTC by fastfasterfastest comment:5

I'd think this would be worth documenting

I agree. You should open an issue at

https://github.com/jquery/api.jquery.com/issues?state=open - that's where documentation bugs are filed.