Very Simple Image Slider/Slideshow with left and right button. No autoplay

前端 未结 4 1697
说谎
说谎 2020-12-31 18:05

I\'m trying to make a very, very simple image slider/slideshow with no autoplay please. I only want to go to next or prev image on click. Having some issues as you can read

4条回答
  •  盖世英雄少女心
    2020-12-31 18:34

    Why try to reinvent the wheel? There are more lightweight jQuery slideshow solutions out there then you could poke a stick at, and someone has already done the hard work for you and thought about issues that you might run into (cross-browser compatability etc).

    jQuery Cycle is one of my favourite light weight libraries.

    What you want to achieve could be done in just

        jQuery("#slideshow").cycle({
        timeout:0, // no autoplay
        fx: 'fade', //fade effect, although there are heaps
        next: '#next',
        prev: '#prev'
        });
    

    JSFIDDLE TO SEE HOW EASY IT IS

提交回复
热议问题