Reputation: 3063
Could you pls let me know what is wrong with my syntax?
This works:
$("#grow").animate({height: "500px"}, "slow");
But this doesn't work:
$("#grow").animate({height: "500px"}, {duration: "3000", easing:"easein"});
Thanks;
Upvotes: 0
Views: 46
Reputation: 53
First, make sure you have both jQuery AND jQueryUI as easing comes from jQueryUI.
http://api.jqueryui.com/easings/
Then try this:
$("#grow").animate({height: "500px"}, {duration: 3000, easing: "easeInQuad"});
Upvotes: 1
Reputation: 308
easing is not a default option swing and linear are.
$("#grow").animate({height: "500px"}, {duration: "3000", easing:"swing"});
You can use a plugin to get more easing options: https://github.com/gdsmith/jquery.easing
Upvotes: 2
Reputation: 10407
Your second parameter shouldn't be an object, but 2 separate parameters as shown in the jQuery animate docs
$("#grow").animate({height: "500px"}, "3000", "easein");
Upvotes: 3