开发者

jquery fadeIn/out images

开发者 https://www.devze.com 2023-01-07 13:03 出处:网络
I want to switch between 3 pictures fading in and out between them but i really have no idea how to approach this.

I want to switch between 3 pictures fading in and out between them but i really have no idea how to approach this. So i have

$('<div id="container"></div>').appendTo('body');  
$('#container').html('<img src="1.开发者_JAVA技巧jpg" />').hide().fadeIn(1500);  

Where do i go from here ? Multiple suggestions are more then welcomed :D thx

I was thinking of animating to opacity : 1 after the image has loaded or using timeout to pause between images


You can write this yourself minimally, but it's at least worth checking out the jQuery Cycle Plugin for this.

You can write a less-code/no-frills version, but if you find you like to have additional effects/options, check out the cycle plugin, no reason to re-write it yourself...it's already widely used/supported.

0

精彩评论

暂无评论...
验证码 换一张
取 消