简体   繁体   中英

How can I disable transitions / effect on a nivo slider?

I have a Nivo Slider on my page and I'd like to disable the slider-transition / effect, but there is no option to set the effect-option to 'no', false or something like that. The following options are allowed:

  • sliceDown
  • sliceDownLeft
  • sliceUp
  • sliceUpLeft
  • sliceUpDown
  • sliceUpDownLeft
  • fold
  • fade
  • random
  • slideInRight
  • slideInLeft
  • boxRandom
  • boxRain
  • boxRainReverse
  • boxRainGrow
  • boxRainGrowReverse

There is no option, but a simple workaround:

Simple choose 'fade' as 'effect' and set 'animSpeed' to 1

Example:

$(window).load(function() {
    $('#slider').nivoSlider({
      effect: 'fade',
      animSpeed: 1
    });
});

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