Reputation: 4182
I can't seem to make the bxSlider working properly and can't find the reason why.
This is my code
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Maxime G - Home</title>
<meta name="viewport" content="width=device-width">
<meta name="keywords" content="portfolio ,html, css, c#, wordpress, UK, developer, front-end, back-end, programming, freelancer, freelance, maxime, godrie, maxime godrie, website" />
<link rel="stylesheet" href="css/normalize.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/jquery.bxslider.css" />
<script src="/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
<script src="/js/slider/jquery.bxslider.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.bxslider').bxSlider();
});
</script>
<section class="sectionCarouselIndex">
<ul class="bxslider">
<li><img src="img/c2c.jpg" /></li>
<li><img src="img/dcs-full.jpg" /></li>
<li><img src="img/eding.jpg" /></li>
<li><img src="img/karim-full.jpg" /></li>
<li><img src="img/waterside-full.jpg" /></li>
<li><img src="img/chesil-full.jpg" /></li>
<li><img src="img/enw-full.jpg"/></li>
<li><img src="img/drl-full.jpg" /></li>
<li><img src="img/portal-full.jpg" /></li>
<li><img src="img/comixology-full.png" /></li>
<li><img src="img/history-full.jpg" /></li>
<li><img src="img/parkmap-full.png" /></li>
</ul>
</section>
This is the error I am getting in the Firefox console:
ReferenceError: jQuery is not defined
[Break On This Error]
$(document).ready(function () {
index.html (line 25)
ReferenceError: $ is not defined
[Break On This Error]
$(document).ready(function () {
If you want to have a look It actually looks like it's working there, but on my local machine there is no way I can make this slider work properly.
Upvotes: 2
Views: 30672
Reputation: 1
I found I need to be more specific that than the document originally lets on probably due to changes in the spec I found this code works better:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/slider/jquery.bxslider.js"></script>
Upvotes: -1
Reputation: 11
I just had bxslider stop working in a Wordpress theme i'm using. Wordpress 3.4.2 uses jquery1.7.2, Wordpress 3.5 uses jquery1.8.3. When i drop the jquery1.7.2 file back in there, bxslider works again. Looks like whatever changed between 1.7.2 and 1.8.0 in jquery broke bxslider.
Upvotes: 1
Reputation: 11
<script type="text/javascript">
$(document).ready(function(){
$('.bxslider').bxSlider({
autoControls: true
});
});
</script>
Try this one as you are not providing any method.
Upvotes: 1
Reputation: 14282
Put the jquery min script reference before the bxslider.js
Replace this
<script src="/js/slider/jquery.bxslider.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
With
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="/js/slider/jquery.bxslider.js"></script>
Upvotes: 7