简体   繁体   中英

Adding Next & Previous Buttons To jquery Roundabout

I am using jQuery Roundabout (http://fredhq.com/projects/roundabout/) to rotate through 3 images. 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.

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

same for btnPrev

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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