Reputation: 3
I am trying to get carousel working but it is not. When I click the arrows the url become mypage.html#myCarousel but nothing happens. Can someone please point to what I am missing here.
Here is my html
<html>
<head>
<link rel="stylesheet" href="css/bootstrap_2.0.3.min.css" type="text/css">
<script language="javascript" type="text/javascript" src="scripts/bootstrap_2.0.3.min.js"></script>
<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" language="javascript">
$(function(){
$('#myCarousel').carousel();
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="span10">
<h2>my carousel</h2>
<div id="myCarousel" class="carousel">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<div class="row">
<div class="span8">
<img src="some image" alt="" width="500">
</div>
<div class="span2">
<p>
some text
</p>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="span8">
<img src="some image" alt="" width="500">
</div>
<div class="span2">
<p>
Some Text
</p>
</div>
</div>
</div>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</div>
</div>
</body>
</html>
Upvotes: 0
Views: 437
Reputation: 75379
You need to include jQuery first, and the bootstrap js later so flip the loading order and it should work.
Upvotes: 1