Skip to main content

Bug Tracker

Side navigation

#7064 closed bug (invalid)

Opened September 22, 2010 04:23PM UTC

Closed September 22, 2010 08:32PM UTC

Last modified September 22, 2010 11:02PM UTC

Animation breaks with incorrect easing name

Reported by: Motty Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: easing animation Cc:
Blocked by: Blocking:

When an incorrect easing name/function is added as an option, it fails gracefully;

        width: "50%",
        easing: "schwing"  // incorrect easing name won't break the animation
    }, 1500);

But if it is added as a string, this and all subsequent animations fail to work:

        width: "100px"
    }, 1500, "schwing");  // incorrect easing name WILL break the animation

Demo here:

I believe this might fix it, but maybe someone who knows the core better can find a better solution:

Line 5853:

var defaultEasing = jQuery.isFunction($.easing[this.options.easing]) ? this.options.easing : (jQuery.easing.swing ? "swing" : "linear");
Attachments (0)
Change History (2)

Changed September 22, 2010 08:32PM UTC by snover comment:1

resolution: → invalid
status: newclosed

The example provided is invalid, because the first object passed to .animate only contains the CSS properties. The correct syntax would be .animate({ width: '50%' }, { easing: 'schwing' }), which will fail in the same way as your second example.

Changed September 22, 2010 11:02PM UTC by Motty comment:2

DOH, well it's still a bug, I'll open a new ticket.