I am trying to make a carousel using bootstrap following is my code, but problem is it shows only one image. I have added total three images but it only shows one of them. and I am also not able to click on icons for buttons. I have added buttons for previous and next but they are also not seen in the page.
<div id="mycarousel" class="carousel-slide">
<ol class="carousel-indicators">
<li data-target="#mycarousel" data-slide-to="0" class="active"></li>
<li data-target="#mycarousel" data-slide-to="1"></li>
<li data-target="#mycarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="1.jpg" alt="Fun" class="img-responsive">
</div>
<div class="item">
<img src="2.jpg" alt="play" class="img-responsive">
</div>
<div class="item">
<img src="3.jpg" alt="learn" class="img-responsive">
</div>
</div>
<a class="carousel-control-left" href="mycarousel" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="carousel-control-right" href="mycarousel" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
I have added both js and jquery.
remove hyphen at first div:
It also seems that you are missing the controls. That's why you can't go to the next slide. Here is the full code of a carousel provided by the bootstrap documentation linked here.