Does anyone have a demo of a jQuery accordion that cycles through content automatically with an option 开发者_如何学编程to set the number of loops or cycles?
StackOverflow has several questions on this topic. One such question can be found here, How to Add Auto-Rotation to a jQuery Horizontal Accordion, and it might be worthwhile reading through.
Here are some other sources that you should look through:
- http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/
http://www.madeincima.eu/samples/jquery/easyAccordion/
for this plugin, all you need to do is:
$('#your-accordion-container').easyAccordion({ autoStart: true, slideInterval: 1000 // milliseconds });
http://www.marghoobsuleman.com/jQuery-common-accordion?
I hope this helps.
I suggest you use whatever jquery accordion plugin you like most, and build the cycling functionality yourself. It is very simple - check out my setInterval
-based answers below. You can see there that there are private variables you could use to set the number of times etc.
I twice answered something almost identical:
Added a timer to Animated Collapsible DIV
emulating tabs being clicked to create a slideshow of tabs in jquery
精彩评论