jQuery animate doing same easing effect for any value

184 Views Asked by At

I want to do a simple animation with jquery, but it keeps doing the same easing effect, i cant change it.

item.animate({
    width: "500px"
},500,"easeInSine");

My code is this simple. When i trigger it it just starts out slow and fast jumps to end. I downloaded jquery ui library again, double checked that all features are selected.

3

There are 3 best solutions below

2
On

You're probably missing the jQuery UI library which contains the easing functions you're trying: http://jqueryui.com/

0
On
$( "#mDiv" ).click(function(){
$('#myDiv').animate(
    { opacity: 0 }, // what we are animating
    'fast', // how fast we are animating
    'swing', // the type of easing
    function() { // the callback
        alert('done');
    });
    });

Just gave an example ..Hope it meets your needs

LIVE DEMO

Also TRY THIS

CLOSEST DEMO

0
On

Whell the problem was that i had transition css property on the div i wanted to animate. after removing it animate ran smoothly.