Skip to content

Instantly share code, notes, and snippets.

@mplacona
Created August 24, 2012 13:57
Show Gist options
  • Save mplacona/3450832 to your computer and use it in GitHub Desktop.
Save mplacona/3450832 to your computer and use it in GitHub Desktop.
Nivo Slider - Arrows Control
<script>
function arrowsCtrl () {
var SlideNo = jQuery('#slider').data('nivo:vars').currentSlide;
var TotalSlidesNo = jQuery('#slider').data('nivo:vars').totalSlides;
if (SlideNo==TotalSlidesNo-1) {jQuery('#slider .nivo-nextNav').hide();jQuery('#slider').data('nivoslider').stop();};
if (SlideNo==TotalSlidesNo-2) {jQuery('#slider .nivo-nextNav').show();jQuery('#slider').data('nivoslider').start();};
if (SlideNo==1) jQuery('#slider .nivo-prevNav').show();
if (SlideNo==0) jQuery('#slider .nivo-prevNav').hide();
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment