问题
i am trying to implement the slider from this site
http://bxslider.com/
i used the exact procedure what they said but still my code is not working can you guys tell me how to fix it
i am providing my fiddle code blow
http://jsfiddle.net/v3efb/3/
http://jsfiddle.net/v3efb/3/embedded/result/
providing my code below
<ul class="bxslider">
<li><img src="http://maxcdn.webappers.com/img/2009/01/jquery-carousel.png" /></li>
<li><img src="http://maxcdn.webappers.com/img/2009/01/jquery-carousel.png" /></li>
<li><img src="http://maxcdn.webappers.com/img/2009/01/jquery-carousel.png" /></li>
<li><img src="http://maxcdn.webappers.com/img/2009/01/jquery-carousel.png" /></li>
</ul>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<!-- bxSlider Javascript file -->
<script src="/js/jquery.bxslider.min.js"></script>
<!-- bxSlider CSS file -->
<link href="/lib/jquery.bxslider.css" rel="stylesheet" />
<script>
$(document).ready(function(){
$('.bxslider').bxSlider();
});
</script>
回答1:
jsFiddle DEMO
In your markup, you are using relative paths to jquery.min.js
, bxslider.min.js
and bxslider.css
files.
That means those files are locally available in their respective subfolders.
However, jsFiddle does not know the complete URL path, aka the absolute path, to those files.
Change the paths so they are a complete URL.
Tip: In jsFiddle, you can import .js
and .css
files as assets using the Add Resources panel on left side.
来源:https://stackoverflow.com/questions/13959494/bxslider-carousel-code