jsor / jcarousel

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

autoscroll stops at final element #767

Closed buddikastay closed 9 years ago

buddikastay commented 9 years ago

Hi,

I love the Jcarousel. It works like a charm. I have a small issue. When autoscrolling is enabled, it auto scroll elements just fine. but when it reach to the last element, it stops there. Its not replaying again. is re-playing is not available in the plugin? Thanks for the support.

jsor commented 9 years ago

Set wrap: 'circular', see http://sorgalla.com/jcarousel/docs/reference/configuration.html#wrap

buddikastay commented 9 years ago

Thanks for the reply Jsor! i tried it like this: .jcarouselAutoscroll({ interval: 3000, target: '+=1', autostart: true, wrap: 'circular' });

But no luck still. Am i doing it in a wrong way? Let me know.

jsor commented 9 years ago

This is an option for the carousel:

.jcarousel({
    wrap: 'circular'
})
.jcarouselAutoscroll({
    interval: 3000,
    target: '+=1',
    autostart: true
});
buddikastay commented 9 years ago

Wow, amazing dude! it worked like a charm. Thanks for the big help. Jcarousel rocks!

fidoboy commented 9 years ago

I've configured exactly this way and it still doesn't work. It stops in last item. wrap parameter is set to 'circular' obviously.

fidoboy commented 9 years ago

If I set wrap to 'last' it works. The carousel rewinds to first item and it starts again, but circular is not working... :cry:

jsor commented 9 years ago

Could you please setup a reproducible testcase somewhere?

fidoboy commented 9 years ago

I can't sorry. But after some testing, no it works, I'm not sure why... But it's not circular, it works the same way than 'last', when autoscroll reach the last item, it rewinds all the way to the beginning 😁