How to change Nivo-Slider easing?
I'm using NivoSlider and I'm not really good on using javascript so I was wondering if how can I change the transition effects on nivo-slider? or can I change it? If it is possible, I would like to use only one tr开发者_JAVA百科ansition effects on my images. Please help.
// This is the default setting:
$('#slider').nivoSlider({effect:'random'}) // Each transition effect will be random
// You can choose from the following effects:
- sliceDown
- sliceDownLeft
- sliceUp
- sliceUpLeft
- sliceUpDown
- sliceUpDownLeft
- fold
- fade
- random
- slideInRight
- slideInLeft
- boxRandom
- boxRain
- boxRainReverse
- boxRainGrow
- boxRainGrowReverse
There are a number of "effects" the Nivo slider supports for transitions - have you seen the usage page yet? You pass an object literal to the nivoSlider call with the parameters you want to use, effect being one of them you can specify. A list of how all the parameters you can set are shown and immediately following that is a list of the available effects. You'll have to be more specific about what specific effect you want if you want a more specific answer.
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider({effect:"fade"});
});
</script>
Use other effects as per your need in place of "fade"
精彩评论