After trying to integrate bootstrap's carousel in my Ruby on Rails application, I created this view:
<head>
</head>
<body>
<div id="carousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1" ></li>
<!--<li data-target="#carousel-example-generic" data-slide-to="2"></li>-->
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="<%= image_url('lol.jpg')%>" alt="Leagues Of Legends">
</div>
<div class="item">
<img src="<%= image_url('SC2.jpg')%>" alt="Starcraft II">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span >
</a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</body>
Even though the carousel displays my first image correctly, none of the navigation buttons or indicators seem to be working when clicked.
It's unclear whether this issue is with my code (I've tested several others with the same result) or with Rails itself.
Any guidance or assistance would be greatly appreciated!
EDIT
Here is the content of my assets/javascript/application.js file:
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap
//= require bootstrap-sprockets
//= require_tree .