简体   繁体   中英

jCarousel display nothing if only one item

I've developed one page using jCarousel within jQuery ui Tabs. Following page is what I got: http://knowledge.teldap.tw/knowledgeFB/my_creation/?fid=668330535

Problem is: If you click the 3rd tab (only one item), you'll find nothing unless you click the left arrow to navigate. It's weird because one the 1st tab ( more than one items) everything is normal and visible.

Can anyone find out what I've missed? Because I've struggled on this for several hours. Thanks!

The problem is the width of your carousel image has not been adjusted properly

In your jquery,put scroll 1

 jQuery('#listelements').jcarousel({
                  scroll : 1,

And also adjust the height of the container

.jcarousel-skin-tango1 .jcarousel-container-horizontal {
    width: 1200px;
    height:630px;
    margin-left://adjust margin left here

}

You may have a look on this carousel example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM