开发者

jQuery easySlider multiple sliders bug?

开发者 https://www.devze.com 2023-03-16 22:43 出处:网络
I have 4 easySliders on one pa开发者_运维知识库ge 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 t

I have 4 easySliders on one pa开发者_运维知识库ge 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('&', '&amp;', $video->title);
            echo '<li>';
            echo '<a href="'.$video->video_id.'" title="'.$title.'"><img src="'.$video->thumbnail.'" alt="'.$title.'" /></a>';
            echo '</li>';
         }
         ?>
      </ul>
    </div>
</div>


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:

$("#basic-slideshow2").easySlider({
auto: false,
continuous:false,
nextId: "slider2next",
prevId: "slider2prev"
});

$("#basic-slideshow3").easySlider({
auto: false,
continuous:false,
nextId: "slider3next",
prevId: "slider3prev"
});

etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号