prashant
prashant

Reputation: 999

How to set active slide for bootstrap carousel?

I want to reset carousel to first slide after closing it.

I am closing carousel using data-dismiss.

Upvotes: 1

Views: 8290

Answers (1)

Partha Ranjan Nayak
Partha Ranjan Nayak

Reputation: 577

Use this

Property .carousel(number)

Where number is the slide number.

Or use data attribute ->

data-slide-to="2"

Where "2" is place of the slide

For more info: BootStrap JavaScript Carousel

Upvotes: 2

Related Questions