javascript - BxSlider: "next" on last slide -> Jump back to first slide? -


i use different version of infinite carousel , scroll first slide (instead of cloning last , first slide , go in 1 direction).

background is: have infinite loop i'm using ids within slides, aren't allowed cloned.

here's demo of bxslider working clones: http://bxslider.com/examples/auto-show-start-stop-controls

thanks!

sorry missing code. here's how can bxslider infinite without cloning items instead jumping first/last slide:

var slider = $('.bxslider').bxslider({,    infiniteloop: false,    hidecontrolonend: false,    startslide: 0 }); 

here's (simple) magic:

$(".bx-controls-direction").on( "click", ".bx-prev.disabled", function() {     var slideqty = slider.getslidecount();     slider.gotoslide(slideqty-1); });  $(".bx-controls-direction").on( "click", ".bx-next.disabled", function() {     slider.gotoslide(0); }); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -