是否可以更改 Nivo Slider controlNav 点的顺序?
DOM 生成的元素是这样的:
<div class="nivo-controlNav">
<a rel="0" class="nivo-control active">1</a>
<a rel="1" class="nivo-control">2</a>
<a rel="2" class="nivo-control">3</a>
</div>
谢谢
是否可以更改 Nivo Slider controlNav 点的顺序?
DOM 生成的元素是这样的:
<div class="nivo-controlNav">
<a rel="0" class="nivo-control active">1</a>
<a rel="1" class="nivo-control">2</a>
<a rel="2" class="nivo-control">3</a>
</div>
谢谢
我更改了 jquery.nivo.slider.js 文件,如下所示:更改已注释!
if(settings.directionNav){
slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>');
$('a.nivo-prevNav', slider).live('click', function(){
if(vars.running) { return false; }
clearInterval(timer);
timer = '';
vars.currentSlide += 2; //changed from -=2
nivoRun(slider, kids, settings, 'prev');
});
$('a.nivo-nextNav', slider).live('click', function(){
if(vars.running) { return false; }
clearInterval(timer);
timer = '';
nivoRun(slider, kids, settings, 'next');
});
}
这部分:
vars.currentSlide--; //instead of ++
startSlide: 4, // change from 0 to [number of slides-1]