The example of this article tells the jquery implementation of a simple automatic playback slide effect. Share to everyone for your reference. The implementation methods are as follows:
HTML section:
<div id= "Slideshow" >
<div>
</div>
<div>
</div>
<div>
Pretty cool eh? This slide are proof the content can be anything.
</div>
</div>
CSS section:
/* Slides need to be absolutely positioned within the wrapper.
This has a tiny bit of extra pizazz: */
#slideshow {
margin:50px auto;
position:relative;
width:240px;
height:240px;
padding:10px;
box-shadow:0 0 20px Rgba (0,0,0,0.4);
}
#slideshow > div {
position:absolute;
top:10px;
left:10px;
right:10px;
bottom:10px;
}
jquery section:
Run after the DOM is ready.
$ ("#slideshow > Div:gt (0)"). Hide ();
SetInterval (function () {
$ (' #slideshow > Div:first ')
. fadeout (1000).
Next ()
fadeIn (1000)
. End ()
. Appendto (' #slideshow ');
}, 3000;
I hope this article will help you with your jquery programming.