jQuery easySlider 多个滑块错误?
我在一页上有 4 个 easySlider,但它们无法正常工作...其中一个工作完美,而两个有点同步在一起,最后一个就是不动,我不知道如何修复它...这里是我的 jQuery:
$(document).ready(function() {
$("#playlist_one").easySlider({
auto: false,
continuous:false
});
$("#playlist_two").easySlider({
auto: false,
continuous:false
});
$("#playlist_three").easySlider({
auto: false,
continuous:false
});
$("#slider").easySlider();
});
这是我的 html 示例:
<div class="showreel">
<div id="playlist_one">
<ul>
<?php
$videos = get_videos();
foreach($videos as $video) {
$title = str_replace('&', '&', $video->title);
echo '<li>';
echo '<a href="'.$video->video_id.'" title="'.$title.'"><img src="'.$video->thumbnail.'" alt="'.$title.'" /></a>';
echo '</li>';
}
?>
</ul>
</div>
</div>
I have 4 easySliders on one page but they don't work properly...one works perfectly, whilst two are kinda synced together and the last one just doesn't move and I have no idea how to fix it...here is my jQuery:
$(document).ready(function() {
$("#playlist_one").easySlider({
auto: false,
continuous:false
});
$("#playlist_two").easySlider({
auto: false,
continuous:false
});
$("#playlist_three").easySlider({
auto: false,
continuous:false
});
$("#slider").easySlider();
});
and here is an example of my html:
<div class="showreel">
<div id="playlist_one">
<ul>
<?php
$videos = get_videos();
foreach($videos as $video) {
$title = str_replace('&', '&', $video->title);
echo '<li>';
echo '<a href="'.$video->video_id.'" title="'.$title.'"><img src="'.$video->thumbnail.'" alt="'.$title.'" /></a>';
echo '</li>';
}
?>
</ul>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在发布已回答的问题之前,您应该阅读插件帮助部分。
当同一页面中有多个幻灯片时,您必须为每个幻灯片分配单个 ID,并为每个幻灯片的每个下一个和上一个按钮分配单个 ID。
例如:
等等...
You should read the plugin help section before posting a question that has been already answered.
when you have multiple slideshow in the same page you have to assign single IDs to each slideshow, and single IDs to each next and prev button of each slideshow.
for example:
etc...