admin管理员组

文章数量:1391960

I'm after 3 carousels on the one page that are controlled by the one control. So when clicking next or previous all carousels move at once.

This an example with 3 carousels but there all seperate.

I'm stuck.

I'm after 3 carousels on the one page that are controlled by the one control. So when clicking next or previous all carousels move at once.

This an example with 3 carousels but there all seperate.

I'm stuck.

Share Improve this question edited Sep 27, 2012 at 18:36 Mark Taylor 1,85114 silver badges17 bronze badges asked Aug 29, 2012 at 0:49 user1631763user1631763 2451 gold badge3 silver badges8 bronze badges 1
  • 1 Any code would be great. I'm sure your problem is there :) – Maksim Vi. Commented Aug 29, 2012 at 0:54
Add a ment  | 

1 Answer 1

Reset to default 7

Here is my example:

http://jsfiddle/D2RLR/1247/

The key part of the code to control all carousels is this:

<button class="btn btn-primary" data-slide="prev" href=".carousel">Prev All</button>
<button class="btn btn-primary" data-slide="next" href=".carousel">Next All</button>

By specifying the .carousel class rather than a specific ID, the button triggers events on all carousels on the page.

本文标签: javascriptBootstrap multiple carousels on one pageStack Overflow