Reputation: 3254
I tried to use jcarousel on my page
I didn't get any error in console but it just doesn't work.
I added libraries and code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="Scripts/jquery.jcarousel.min.js"></script>
<script src="Scripts/jquery.jcarousel-autoscroll.min.js"></script>
<script src="Scripts/jquery.jcarousel-control.min.js"></script>
<script>
$(function () {
$('.jcarousel-1').jcarousel({
vertical: true,
'wrap': 'both',
'list': '.jcarousel-list',
'scroll', '+=2'
})
.jcarouselAutoscroll({
});
$('.jcarousel-prev').jcarouselControl({
target: '-=1'
});
$('.jcarousel-next').jcarouselControl({
target: '+=1'
});
});
</script>
This is my code
http://jsfiddle.net/mDmZ5/2/
I need to show only two items and use arrows to leaf through.
Can someone explain me what's wrong with my code?
Upvotes: 0
Views: 2654
Reputation: 10658
Your configuration object for jCarousel is an invalid object declaration (you have a comma between scroll
and it's value instead of a colon). Try this instead:
$('.jcarousel-1').jcarousel({
vertical: true,
'wrap': 'both',
'list': '.jcarousel-list',
'scroll': '+=2'
})
Note: Your jsFiddle won't work because you can't link source from Github.
Upvotes: 1