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(); } });
Comments
Post a Comment