我在页面部分使用jquery图层滑块。我的html页面是从Github下载的One Page Scroller。我的页面部分中的图层滑块不起作用。我还在我的页面上使用了一个jquery手风琴。单页滚动js和手风琴正在工作,但层滑块js没有被调用。
以下是我在标题中使用的js文件。
<link href="assets/css/main.css" rel="stylesheet">
<script src="assets/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="assets/js/modernizr.custom.js"> </script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.easing.1.3.js"></script>
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- Added for LayerSlider -->
<link rel="stylesheet" href="assets/css/layerslider.css" type="text/css">
<!-- External libraries: jQuery & GreenSock -->
<script src="assets/js/greensock.js" type="text/javascript"></script>
<script src="assets/js/layerslider.transitions.js" type="text/javascript"></script>
<script src="assets/js/layerslider.kreaturamedia.jquery.js" type="text/javascript"></script>
<!-- Added for LayerSlider -->
<script type="text/javascript" src="assets/js/jquery.onepage-scroll.js"></script>
<link href='assets/css/onepage-scroll.css' rel='stylesheet' type='text/css'>
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no">
以下是我的javascipt函数调用。
<script type="text/javascript" src="assets/js/jquery-ui.js"></script>
<script type="text/javascript">
$( "#accordion" ).accordion({
heightStyle: "content",
collapsible: true,
active: 'none',
animate: {
duration: 400
}
});
$('#close').click(function () {
$("#accordion").accordion({active: false}).click();
});
</script>
<script>
$(document).ready(function(){
$(".main").onepage_scroll({
sectionContainer: "section",
responsiveFallback: 600,
loop: true
});
$("#layerslider").layerSlider({
pauseOnHover: false,
responsive: true,
layersContainer: 1170,
skinsPath: 'assets/skins/',
navPrevNext: true
});
});
</script>
<script>
$('#layerslider').layerSlider();({
pauseOnHover: false,
responsive: true,
layersContainer: 1170,
skinsPath: 'assets/skins/',
navPrevNext: true
});
</script>
请帮忙。如何让我的图层滑块工作。