Setting number of visible images in jCarousel

断了今生、忘了曾经 提交于 2019-11-28 13:49:31

Try this

jQuery('#mycarousel').jcarousel({
    visible: 3
});

Need to change both width of container & clip; & increase item numbers by visible: 10

JS

jQuery('#mycarousel').jcarousel({
    visible: 10
});

CSS

.jcarousel-skin-ie7 .jcarousel-container-horizontal
{
    width:750px;
}

.jcarousel-skin-ie7 .jcarousel-clip-horizontal {
    width:740px; 
}

Just change the CSS for:

.jcarousel-skin-tango .jcarousel-container-horizontal

[change the width to whatever you want]

I recently ran across the same problem. It turns out that if you have an earlier version of jQuery it will default to three items no matter what your visibility is set to.

I could not find the skin widths in my CSS file though, so I could just be missing something.

I figured this out by playing with it here: http://jsfiddle.net/xNjwh/168/ , reverting to my older jQuery version, and messing with the following code:

jQuery('#mycarousel').jcarousel({visible: 4});

Hi not really an answer as such more of an alternative. I spent some time on this issue myself and my eventual solution was to use a different jQuery carousel plugin instead which offers much more in the way of customisation and is almost identical in its features.

It allows you to specify your own css rules if you need to for the container items which is pretty essential to most I imagine.

jquery-carousel-lite

I'm not associated with the developer Karl Sweedberg in any way. Its based on the original code by Ganeshji Marwaha.

Hope it helps someone.

Jimmy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!