jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 734 forks source link

jcarouselAutoscroll not working with me #730

Closed wassem closed 9 years ago

wassem commented 9 years ago

hi i have this extension in opencart and it use jcarousel i want to add jcarouselAutoscroll and it is not working look at the code here

<script type="text/javascript"><!--
$('#lpbccarousel<?php echo $module; ?> ul').jcarousel({
    vertical: false,
    visible: 4,
    scroll: 3
})
.jcarouselAutoscroll({
            interval: 3000,
            target: '+=1',
            autostart: true
        })
;
//--></script>

i added this is header

<script type="text/javascript" src="catalog/view/javascript/jquery/jquery.jcarousel-autoscroll.js"></script>

and i can see it in frontend

jsor commented 9 years ago

Looks like you're using the old version 0.2. Try this:

$('#lpbccarousel<?php echo $module; ?> ul').jcarousel({
    vertical: false,
    visible: 4,
    scroll: 3,
    auto: 3
});
wassem commented 9 years ago

great thank you it is auto scrolling now but without rewind or infinite scrolling?

can this be done

jsor commented 9 years ago

Just set the the wrap option to circular or last. You can download the latest 0.2 package from the release page (https://github.com/jsor/jcarousel/releases/tag/0.2.9) which also contains the documentation of all available options.