简体   繁体   English

将下一个和上一个按钮添加到jQuery Roundabout

[英]Adding Next & Previous Buttons To jquery Roundabout

I am using jQuery Roundabout (http://fredhq.com/projects/roundabout/) to rotate through 3 images. 我正在使用jQuery Roundabout(http://fredhq.com/projects/roundabout/)来旋转3张图像。 I am not aware of how I can add "Next" and "Prev" buttons to help the user rotate through the images. 我不知道如何添加“下一步”和“上一步”按钮来帮助用户旋转图像。 Currently I have it set to auto rotate or slide to next image if the user clicks on the image itself. 目前,如果用户单击图像本身,则将其设置为自动旋转或滑动到下一张图像。 However, I would like to also add the ability of these buttons as a secondary means of navigation. 但是,我还要添加这些按钮的功能,作为辅助导航方式。 Is there something in the existing code that needs to be changed in order to make this work or does it require separate code? 为了使这项工作有效,现有代码中是否需要更改某些内容?还是需要单独的代码?

get a button, give it a class of next then in your roundabout, set to option to the next button. 得到一个按钮,给它一个next一个类别,然后在回旋处,设置为下一个按钮的选项。

<script>
   $(document).ready(function() {
      $('ul').roundabout({
         btnNext: ".next"
      });
   });
</script>

same for btnPrev btnPrev

http://fredhq.com/projects/roundabout/#/api http://fredhq.com/projects/roundabout/#/api

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM