简体   繁体   中英

jcarousel is not scrolling through images

i have a jcarousel gallery of images

but the jcarousel is not working at all it's not scrolling through images at all

this is my code :

<ul id="mycarousel" class="jcarousel-skin-tango">  
    <?php foreach ($images as $image_item) : ?>
     <li><img src="<?php echo $image_item['Path']; ?>"/></li>
    <?php endforeach; ?>
</ul>

and this is my css :

.jcarousel-skin-tango .jcarousel-container {
    width:500px;
    height:250px;
    background: none;
    border: none;
}
.jcarousel-skin-tango .jcarousel-container-horizontal {
    height:250px;
    padding: 20px 40px;
}
.jcarousel-skin-tango .jcarousel-clip-horizontal {
    width:  500px;
    height: 250px;
}
.jcarousel-skin-tango .jcarousel-item {
    width: 500px;
    height: 250px;
}

.jcarousel-skin-tango .jcarousel-item-horizontal {
margin-left: 0;
    margin-right: 10px;
}

and there is my js :

$(document).ready(function(){
$('#mycarousel').jcarousel({wrap:'circular'});
});

Your code is almost correct — you just need to add "auto: 1" (or some other non-zero number of seconds) and it'll start auto-scrolling. If you don't want auto-scroll, you need to specify the "buttonNextHTML" and "buttonPrevHTML" parameters to get buttons.

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