質問

I'm trying to make this working:

jQuery('.header').animate({ opacity: 1 }, {queue:false,duration:250},function(){
        console.log('complete');
});

but unfortunately callback isn't triggered.

Do you know why?

役に立ちましたか?

解決

When passing an object as the second argument, any callback you want to be executed should be included in that object.

jQuery('.header').animate({ opacity: 1 }, {
    queue:false,
    duration:250,
    complete: function(){
        console.log('complete');
    }
});

You can learn more on how the API works in their documentation

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top