Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Bootstrap Carousel

Bootstrap Carousel

Description

In this tutorial, you will see how to create a carousel with Bootstrap. This will help you create content sliders, image galleries, and more.

Usage





            

So you place the items you want to present (such as images) in circular order inside the "carousel-inner" div, and through the "" create navigation for the items. It uses the custom data attribute "data-slide" to navigate to the previous and next items.

You must reference the jquery.js and bootstrap-carousel.js files in the HTML file where you create the carousel.

Bootstrap carousel example

Example

    

     Bootstrap paging example with next and previous

    

    

    

View the example online

Paging example with old and new

Example

    

    

        

            

HTML5 and JS Apps

            

 

            

        

    

    


    

        

© Company 2012

    

View the example online

Using JavaScript

You can use the JavaScript code below to create a carousel.



$('.carousel').carousel()

Below are the options you can useOption

Below are the carousel methods you can useMethod

There are twoEventsused to enhance the carousel's functionality.

Click here to download all the HTML, CSS, JS, and image files used in this tutorial.