[英]image slider and a cycle plugin of jquery not working together
Here i am using a image slider and a cycle plugin of jquery. 这里我使用的是图像滑块和jquery的循环插件。 but only one of them working whose code is placed above .
但只有其中一个工作的代码放在上面。 Where is the problem ?
问题出在哪儿 ? mY CODE OF HEAD CONTENT IS GIVEN BELOW.
下面提到了几个头部内容的代码。
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/easySlider1.7.js" type="text/javascript"></script>
<link href="css/jq.css" rel="stylesheet" type="text/css" />
<link href="css/cycle.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="js/chili-1.7.pack.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.cycle.all.js" type="text/javascript"></script>
$(document).ready(function () {
$('#s1').cycle({
fx: 'scrollDown',
speedIn: 2000,
speedOut: 500,
easeIn: 'easeInCirc',
easeOut: 'easeOutBounce',
delay: -2000
});
$("#slider").easySlider({
auto: true,
continuous: true,
nextId: "slider1next",
prevId: "slider1prev"
});
});
<link href="css/screen.css" rel="stylesheet" type="text/css" />
slider code 滑块代码
<div id="slider" >
<ul>
<li><a href="http://templatica.com/preview/30"><img src="images/01.jpg" alt="Css Template Preview" /></a></li>
<li><a href="http://templatica.com/preview/7"><img src="images/02.jpg" alt="Css Template Preview" /></a></li>
<li><a href="http://templatica.com/preview/25"><img src="images/03.jpg" alt="Css Template Preview" /></a></li>
<li><a href="http://templatica.com/preview/26"><img src="images/04.jpg" alt="Css Template Preview" /></a></li>
<li><a href="http://templatica.com/preview/27"><img src="images/05.jpg" alt="Css Template Preview" /></a></li>
</ul>
</div>
<div class="clear">
</div>
</div>
and cycle plugin html 和循环插件html
<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" alt="" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" alt="" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" alt="" />
</div>
The include order may matter and you have a duplicate jquery.js
. 包含顺序可能很重要,您有一个重复的
jquery.js
。 Try this order: 试试这个订单:
<link href="css/jq.css" rel="stylesheet" type="text/css" />
<link href="css/cycle.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="js/jquery.cycle.all.js" type="text/javascript"></script><script src="js/easySlider1.7.js" type="text/javascript"></script>
<script src="js/chili-1.7.pack.js" type="text/javascript"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.