Im getting the following error while trying to execute carousel code…
Uncaught TypeError: $(…).carousel is not a function
Below is my jquery code:
$('#myCarousel').carousel({
interval: 3000
});
Below is my html code
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-4">
<!-- Carousel
================================================== -->
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<a href="#"><img class="thumbnail" src="http://placehold.it/600x400/" alt="Slide1"></a>
<div class="caption">
<h4>Lorem ipsum dolor sit amet, consetetur sadipscing elitr</h4>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </p>
</div>
</div>
<div class="item">
<a href="#"><img class="thumbnail" src="http://placehold.it/600x400/" alt="Slide2"></a>
<div class="caption">
<h4>Lorem ipsum dolor sit amet, consetetur sadipscing elitr</h4>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </p>
</div>
</div>
<div class="item">
<a href="#"><img class="thumbnail" src="http://placehold.it/600x400/" alt="Slide3"></a>
<div class="caption">
<h4>Lorem ipsum dolor sit amet, consetetur sadipscing elitr</h4>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. </p>
</div>
</div>
</div>
<!-- Indicators -->
<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><!-- End Carousel -->
</div>
</div>
ITS working fine in bootsnip…I tried to execute in my pc …its showing the above error.
Below is my bootsnip link
http://bootsnipp.com/user/snippets/y8by1