Tutorial :jquery fadeIn/out images



Question:

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.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


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »