Hello all I have five items in a carousel.
The first slide has a class of "active" but how can I make it so when the next slide comes on it becomes the active one?
this is what I have so far.

Code:
<ol class="carousel-indicators">
						<li data-target="#slideShow" data-slide-to="0" class="active">
								<a href="#"></a>
						</li>
						<li data-target="#slideShow" data-slide-to="1">
								<a href="#"></a>
						</li>
						<li data-target="#slideShow" data-slide-to="2">
								<a href="#"></a>
						</li>
						<li data-target="#slideShow" data-slide-to="3">
								<a href="#"></a>
						</li>
						<li data-target="#slideShow" data-slide-to="4">
								<a href="#"></a>
						</li>
					</ol>
and the script

Code:
   $(function() {
        $('#slideShow').carousel({interval: 2000, cycle:true});
        $('#slideShow').on('slide', function() {
            var to_slide = $('.carousel-item.active').attr('data-slide-no');
            $('.myCarousel-target.active').removeClass('active');
            $('.carousel-indicators [data-slide-to=' + to_slide + ']').addClass('active');
        });
        $('.myCarousel-target').on('click', function() {
            $('#slideShow').carousel(parseInt($(this).attr('data-slide-to')));
            $('.myCarousel-target.active').removeClass('active');
            $(this).addClass('active');
        });
    });
thank you
D