gpt4 book ai didi

javascript - JQuery 循环插件不工作

转载 作者:行者123 更新时间:2023-11-28 20:36:13 26 4
gpt4 key购买 nike

我正在尝试将 jquery Cycle 幻灯片插件添加到我的页面,并具有“淡入淡出”过渡效果。但我仍然无法让它工作。

这是我的 html :

<div class="container">
<div class="slide1">
<blockquote>
<span class="leftquotes">&ldquo;</span> He promptly completed the task at hand and communicates really well till the project reaches the finishing line. I was pleased with his creative design and will definitely be hiring him again. <span class="rightquotes">&bdquo; </span>
</blockquote>
<img src="images/profile.jpg" width="120" height="100" />
<h2>Steve Kruger</h2>
<h6>UI/UX Designer at Woof Design Studio</h6>
<div class="slide1bottom"></div>
</div>

<div class="slide2">
<blockquote>
<span class="leftquotes">&ldquo;</span> Till the project reaches the finishing line. I recommend him to anyone who wants their work done professionally. project reaches the finishing line. I recommend him to anyone who wants their work done professionally. The project ... <a href="#"> read more</a><span class="rightquotes">&bdquo; </span>
</blockquote>
<img src="images/images.jpg" width="120" height="100" />
<h2>John Doe</h2>
<h6>Developer Relations at Woof Studios</h6>
<div class="slide2bottom"></div>
</div>

<div class="slide3">
<blockquote>
<span class="leftquotes "> &ldquo;</span> He promptly completed the task at hand and communicates really well till the project reaches the finishing line. I was pleased with his creative design and will definitely be hiring him again. <span class="rightquotes">&bdquo; </span>
</blockquote>
<img src="images/summer_school.png" width="120" height="100" />
<h2>Steve Stevenson</h2>
<h6>CEO Woof Web Design Studios</h6>
<div class="slide3bottom"></div>
</div>
</div>

这是我的 JQuery:

$(function() {
$('#container').cycle();
});

我已经正确地将JQuery插件、循环插件和缓动插件导入到我的页面中。

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery.color.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="jscript/jquery.easing.1.3.js"></script>

这是我的 fiddle :http://jsfiddle.net/kRZ5r/

最佳答案

您指定用于初始化cycle的选择器正在寻找id,而它应该寻找class

$('.container').cycle({
timeout: 10000
});

fiddle here

关于javascript - JQuery 循环插件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15318817/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com