Hi,
I had a situation where I chose a fixed number of visible items.
However the items available were equal or less, but they would still scroll.
eg. I was showing two images, scrolling by 1 image per timeout and in this case there were only 2 images available.
Obviously it caused some trouble and looked silly.
So I found some other code in the posts and added this to the jcarousel.js at line 155
/* Hack! Stop the carousel scrolling if less than set items in view.
itemCount already used in above code.....
*/
if (itemCount <= carousel.options.visible) {
var noScroll = true;
carousel.stopAuto();
};
if (carousel.pageCount == 1 || noScroll == true) {
carousel.buttonNext.addClass('jcarousel-next-disabled').attr('disabled', true);
carousel.buttonPrev.addClass('jcarousel-prev-disabled').attr('disabled', true);
}
This code seems to do what I want, and it makes sense I think, because I have chosen the number visible.
If I choose the number visible and less items than the number visible show up, then logically I wouldn't want to scroll.
If people want to be responsive I would assume the Auto setting would be chosen.
So if this makes sense, could some code that does this be added to the module please.