Reputation: 190
I've been trying to get the standard carousel in Bootstrap to advance every time you click a slide without using indicators or controls. Just wanted to ask if there's a way of getting it to work such way. This without using an onclick event on the page but rather using jQuery for navigation.
Upvotes: 1
Views: 2828
Reputation: 190
$("#Mycarousel").carousel('next');
Now seems to work. Sorry I was using id's and am a newbie with jQuery so I had the same id on all slides and forgot it's the same page and it doesn't know "slides" or images or imgs or whatever :/
Upvotes: 1
Reputation: 36703
Say if carousel id is carousel
var number = 0;
$("#carousel img").click(function() {
$("#carousel").carousel(++number);
});
Upvotes: 2