I am using .animate() to animate my picture gallery.But when I use the hide function it puts its own easing effect which is undesirable since I want a linear easing. I tried the following but its not working.

$(picArray[picArrayIndex - 1]).hide( '500','linear',function(){
    $(picArray[picArrayIndex]).show();
     });

Any way around this?

有帮助吗?

解决方案 2

Try this :

$(picArray[picArrayIndex - 1]).hide({duration : 500, easing : 'linear', complete: function(){your things}})

Here's the list of option you can use : http://api.jquery.com/hide/#hide-options

其他提示

put '0' as first parameter which means that the animation won't be visible. The 'linear' is needless as you don't want any animation.

   $(picArray[picArrayIndex - 1]).hide(0, function(){
        $(picArray[picArrayIndex]).show();
    });
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top