in the setupCarousel function of jcarousel.js is code to hide the next/prev arrows if all items of the list fit into one page. however this code fails if the last item is only partially visible in the display. though it 'fits' into the page it's not displayed completely. however the arrows will be hidden by code and the user is not able to scroll the page to fully see the last item which is weird.

i commented the codeblock for hiding the arrows in setupCarousel and the thing works. furthermore the carousel works now as expected - it even hides the next/prev arrows correctly on it's own without jcarousel.js's help, even if there's only one page visible and all items fit into the page.

this leads to the question if this code is just a leftover and could be removed.

Comments

longwave’s picture

I can confirm the original problem described here where the last item is only partially visible, and indeed removing the following block of code from jcarousel.js fixes this issue for me too:

  // Disable the previous/next arrows if there is only one page.
  if (carousel.pageCount == 1) {
    carousel.buttonNext.addClass('jcarousel-next-disabled').attr('disabled', true);
    carousel.buttonPrev.addClass('jcarousel-prev-disabled').attr('disabled', true);
  }
SanderJP’s picture

Hi,

I know it's been a while but I ran into this problem again, and it is in my opinion a bug that needs to be fixed. This also disables the buttons if you set the Wrap Content option in Views jCarousel options to Circular. So all items fit on the page but since it's circular it never ends, but the buttons are removed.

Greets,
Sander

swfindlay’s picture

I have the same issue. Is there a better way to solve this than changing the code in the module?

guardiola86’s picture

Issue summary: View changes

I'm having the same issue. Would it be possible to add an option to show it or not instead of relying on the pageCount variable?

markpavlitski’s picture

Status: Needs review » Closed (duplicate)

This looks like a duplicate of #1488890: Don't hide the buttons if the carousel is wrapping continuously which is fixed in the latest release.

Please re-open if the 7.x-2.7 version doesn't fix this issue.