$('#myCarousel').carousel('next')
will move to the next item as mentioned in the
documentation.
To achieve this, you can bind a scroll event like this:
$('#myCarousel').bind('mousewheel', function() {
$(this).carousel('next');
});
An alternative method is to listen for mouse wheel events and navigate to the next or previous slide accordingly. Check out this link for more details:
$('#myCarousel').bind('mousewheel', function(e) {
if(e.originalEvent.wheelDelta /120 > 0) {
$(this).carousel('next');
} else {
$(this).carousel('prev');
}
});
If you want to apply this functionality to all carousels instead of just one specific carousel, use a class selector: Use $('.carousel').bind(...)
. This approach is more suitable if you want all your carousels to support mouse wheel navigation.