Search code examples
jquerycssjcarousel

jCarousel custom start position


I need to set custom start position for jCarousel list.

I've got 4 visible slides inside a carousel, but i need to have only two of them fully visible in the middle of carousel and half of another one from the left side and half of another one from the right side.

How it looks now

How it should be

qCarousel official documentation says that in order to set start position through CSS i should use this:

.jcarousel ul {
    left: -150px;
}

But it gets overrided by jcarousel script which set position:left to 0 again.

And by event method i can only choose a slide to start from, like first slide or second.

How should i fix this?


Solution

  • Try

    .jcarousel ul {
        left: -150px !important;
    }
    

    Or

    Wrap the carousel in a container with overflow:hidden and adjust the carousel within it to obtain your correct positioning.