-1

I have this:

$('h1').animate({
    //stuff to be changed,
}, {
    duration: 1000, 
    queue: false
})

It doesn't accept when I change it to something like this:

{
    duration: 1000, 
    queue: false, 
    easing: easeOutBounce
}

When providing the easing as a string, I get this error:

Uncaught TypeError: n.easing[this.easing] is not a function

How should I place the easing type?

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Dawid
  • 585
  • 5
  • 26

1 Answers1

3

The easing should be a string, like so:

{
    duration: 1000,
    queue: false,
    easing: 'easeOutBounce'
}

The API Docs on .animate() state:

easing (default: swing)

Type: String

A string indicating which easing function to use for the transition.

Kaspar Lee
  • 5,446
  • 4
  • 31
  • 54