我正在使用flexslider,似乎滑块无法正常工作。李项目工作不正常,没有显示?
这是我的代码。
<html class="no-js" lang="en">
<head>
<meta content="charset=utf-8">
<title>FlexSlider 2</title>
<!-- Demo CSS -->
<link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" />
<link rel="stylesheet" href="flexslider.css" type="text/css" media="screen" />
<!-- Modernizr -->
<script src="js/modernizr.js"></script>
<style>
img {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
-webkit-filter: grayscale(1);
}
img:hover {
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
-moz-filter: grayscale(0%);
filter: grayscale(0%);
filter: gray;
-webkit-filter: grayscale(0);
-moz-transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
}
</style>
</head>
<div class="flexslider">
<ul class="slides">
<li>
<img src="images/stark.png" />
</li>
<li>
<img src="images/ad.png" />
</li>
<li>
<img src="images/ad.png" />
</li>
<li>
<img src="images/ad.png" />
</li>
</ul>
</div>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
<!-- FlexSlider -->
<script defer src="jquery.flexslider.js"></script>
<script type="text/javascript">
$(function(){
SyntaxHighlighter.all();
});
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
animationLoop: false,
itemWidth: 210,
itemMargin: 5
});
});
pausePlay: true,
start: function(slider){
$('body').removeClass('loading');
}
});
});
</script>
<!-- Syntax Highlighter -->
<script type="text/javascript" src="js/shCore.js"></script>
<script type="text/javascript" src="js/shBrushXml.js"></script>
<script type="text/javascript" src="js/shBrushJScript.js"></script>
<!-- Optional FlexSlider Additions -->
<script src="js/jquery.easing.js"></script>
<script src="js/jquery.mousewheel.js"></script>
<script defer src="js/demo.js"></script>
</body>
</html>
它位于一个单独的html文件中,我只需在我的主文件上添加一个iframe即可在我的广告框中显示。希望你能帮助我。谢谢! :)
答案 0 :(得分:0)
尝试在此处删除多余的关闭})
:
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
animationLoop: false,
itemWidth: 210,
itemMargin: 5
// }); <-- Here
// }); <-- Here
pausePlay: true,
start: function(slider){
$('body').removeClass('loading');
}); // <-- Add closing ) for start() function
});
});