Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap carousel. Add pagination dots to bottom

How would it be possible to add pagination as in dots to the existing carousel for bootstrap.

It needs to move automatically through the dots.

Very new to this and need a little hand.

Here is my code:

http://jsfiddle.net/mdesignone/qXgCg/

Thanks:)

like image 789
user1631763 Avatar asked Sep 04 '12 21:09

user1631763


2 Answers

This feature is currently slated to be included in the 2.3 milestone (currently at 2.1). There is presently a pull request which already implements this functionality, and I would recommend using it rather than rolling your own, as it is more likely to be consistent with the final API once the feature gets integrated officially.

The source for the plugin can be found in mikaelbr's fork of the Bootstrap project. You will require both the bootstrap-carousel.js and the carousel.less.

Here is a demo:

JSFiddle

like image 84
merv Avatar answered Sep 20 '22 19:09

merv


With latest carousel, you can use carousel-indicators class:

 <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>
 </ol>

http://getbootstrap.com/javascript/#carousel

like image 32
Kien Pham Avatar answered Sep 23 '22 19:09

Kien Pham