javascript - How to stop sliding after last image in FilmRoll jQuery carousel -


i want stop filmroll jquery carousel after first loop disable next button. user can still see previous button disabled on first slide.

any suggestion?

$( document ).ready(function() {   /*var film_roll = new filmroll({     container: '#portfolioslider',     vertical_center: true,     hover: false,     scroll: false   });*/     var film_roll = new filmroll({     container: '#portfolioslider2',     vertical_center: true,     hover: false,     scroll: false,     move_on_start: false,     offset: -111   }); });  $('#portfolioslider2').on('film_roll:moved', function(event) {   alert(film_roll.index);   if ( film_roll.index == film_roll.children.length - 1 ) {     alert("hello");     film_roll.clearscroll();   } }); 

maybe removing prev/next arrows solution you...

// remove prev arrow settimeout(function(){   $(document).find('.film_roll_prev').hide(); },600);  $('#portfolioslider2').on('film_roll:moved', function(event) {   console.log(film_roll.index);    if ( film_roll.index == film_roll.children.length - 1 ) {     console.log("hello");      // remove next arrow     $('.film_roll_next').hide();     film_roll.clearscroll();   } }); 

codepen


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -