开发者

Jquery Slideshow No Fade

http://www.beulahprint.ie

I'm trying to build a client testimonials slideshow. I want about 10 divs, each div will have an image and some text i开发者_Python百科n it, and jQuery cycles through the divs, pausing for a few seconds on each div and repeats the cycle when finished. One div is showing at a time, with no fade.

Alternatively, I could have just one div, with alternating content if this is possible?

I have images fading on my site currently, but I can't find any help on div slideshows with no fades.


There's a plug in described here that lets you cycle through images using any effect you like.


I usually use 1 div that represents the slideshow, together with a hidden unnumbered list with the items that need to be displayed.

<div id="slideshow">
   <div id="image"></div>
</div>
<ul id="images" style="display:none;">
   <li>image1.jpg</li>
   <li>image2.jpg</li>
</ul>

You can run trough the list with jquery next() function (http://api.jquery.com/next). Get the html value of the current list item and set the background of the div#image to that value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜