-1

Problem

My BXSlider just isn't working/appearing?! Nothing is appearing at all, just a blank page. As far as i'm aware i've structured the page properly?

What it should look like.

enter image description here

My HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-1.11.1.min.js"></script>

<!-- bxSlider CSS file -->
<link href="jquery.bxslider.css" rel="stylesheet" />
<title>Untitled Document</title>
</head>

<body>

<!-- bxSlider Javascript file --> 
<script src="jquery.bxslider.min.js">
$(document).ready(function(){
  $('.slider1').bxSlider({
    slideWidth: 200,
    minSlides: 2,
    maxSlides: 3,
    slideMargin: 10
  });
});

<div class="slider1">
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar1"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar2"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar3"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar4"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar5"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar6"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar7"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar8"></div>
  <div class="slide"><img src="http://placehold.it/350x150&text=FooBar9"></div>
</div>


</body>

</html>
Dan Cundy
  • 2,649
  • 2
  • 38
  • 65
  • Is there an error on your console (firefox or chrome)? and try to move the bxslider script to section. – Jorge F Jun 09 '14 at 14:59
  • nothing in the console, moved the script to the header but no change. If i add a closing tag at the end of the script, the images display but are not ordered or affected by the script? Do i need a closing tag? – Dan Cundy Jun 09 '14 at 15:04
  • seems invalid block of script which contains doc ready, because a script with a src you just cannot put script in that block. – Jai Jun 09 '14 at 15:05
  • @Jai, could you explain what you mean better? – Dan Cundy Jun 09 '14 at 15:07
  • 2
    What Jai said, you need to close the and then call another with your document ready – Jorge F Jun 09 '14 at 15:08
  • 1
    @dancundy just do as jorge suggested. – Jai Jun 09 '14 at 15:11

1 Answers1

1

You need to close script block with </script>

...
</script>
<div class="slider1">
...
user2316116
  • 6,726
  • 1
  • 21
  • 35