Robert
Robert

Reputation: 812

Arrow disable if there are no more image in the left or right

I use BxSlider carousel to display my gallery image, Lets say that I have nine images and the script is set with minSlides: 3 and maxSlides: 3, and i am watching image 1-3, then the arrow should be only on the right side, which means i can browse for more pics to the right. then, when i browse the the right and i am watching f.e. image 4,5,6, in this case the arrows should be on boths sides, because there are pics to the left and to the right. BUT, if i browse again to the right and get until image 7,8,9, the the arrow on right side should disappear because there is nothing more to browse to the right. only the left arrow should be shown in this case.

My bxslider script look like this:

jQuery(document).ready(function() {
  jQuery('#bxslider').bxSlider({
    auto: false,
    pager: false,
    controls: true,
    infiniteLoop:false,
    slideWidth: 125,
    minSlides: 3,
    maxSlides: 3,
    slideMargin: 10,
    adaptiveHeight: true
  });
});

Upvotes: 0

Views: 744

Answers (1)

isherwood
isherwood

Reputation: 61083

See the docs: http://bxslider.com/options#hideControlOnEnd

hideControlOnEnd: true,

Protip: use namespacing to allow use of the dollar sign in your code:

jQuery(document).ready(function($) {
    $('#bxslider').bxSlider({ ... });
});

Upvotes: 1

Related Questions