Reputation: 525
Im having many problems with my Twitter bootstrap Carousel what ever i do is not working so if some one can make a example for me it will help me alot if you dont only say no. I did post a topic and i did get much good response but it did not fix it. I want work many hours now to try to fix it. So thank you if you want to help me fix this.
Hole Side:
<!DOCTYPE>
<html>
<head>
<!--- START Styles --->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css">
<link rel="stylesheet" href="css/bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="index.css" type="text/css" />
<!--- END Styles --->
<!--- START Scripts --->
<script type="text/javascript" src="http://localhost/mywebside/js/jquery.js"></script>
<script type="text/javascript" src"http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.carousel').carousel();
</script>
<!--- END Scripts --->
</head>
<body>
<!--- NavBar TOP --->
<nav class="navbar navbar-custom" role="navigation">
<ul>
<li class="li">
<a href="http://localhost/mywebside/index.php" class="navbar-menu2">Home</a>
</li>
<li class="li">
<a href="#" class="navbar-menu">Products</a>
<ul class="dropdown">
<li><a class="text" href="">MineCraft Web</a></li>
<li><a class="text" href="#">Webdesign</a></li>
<li><a class="text" href="#">Prices and ordering</a></li>
</ul>
</li>
<li class="li">
<a href="#" class="navbar-menu2">References</a>
</li>
<li class="li">
<a href="" class="navbar-menu2">MineCraft</a>
</li>
<li class="li">
<a href="#" class="navbar-menu2">Contact Us</a>
</li>
<li class="li">
<a href="#" class="navbar-menu2">About ...</name></a>
</li>
</ul>
</nav>
<div class="box">
<h2 class="text-header">MineCraft Webside</h2>
<h5 class="text-des">Advanced minecraft website with server status, forums, user profiles, shop and more.</h5>
<div id="myCarousel" class="carousel">
<div class="carousel-inner">
<div class="active item"><img src="img/dirt.png" /></div>
<div class="item"><img src="img/Wood.png" /></div>
<div class="item"><img src="img/Stone.png" /></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>
</body>
</html>
Im getting on Console error:
Uncaught TypeError: Object [object Object] has no method 'carousel'
Upvotes: 0
Views: 462
Reputation: 10658
You forgot to close your $(document).ready(function(){
. This is probably your issue.
<script type="text/javascript">
$(document).ready(function(){
$('.carousel').carousel();
});
</script>
Also, You should reference the bootstrap js and css from the netdna CDN or locally. You shouldn't use the getboostrap.com url as that's not intended as a host for bootstrap (if nothing else, it may disappear without warning).
Upvotes: 1