rcarousel
rcarousel copied to clipboard
carousel not works with one more instance at same page
this carousel not works with more then one instance of carousel.
for example, if you have 3 carousels at your page, only the first carousel works. The other two execute the commands of the first instance only.. prev and next button for example...
that is beacuase in the CSS and javascripts they use id's as "#carousel".
try changing all such instances into classes ".carousel". It should work then.
Like said rajanwat, yes it works. Here i have 3 instances os them and works fine with class.
var $wrapper = $('.js-rcarousel');
$wrapper.each(function () {
var options = {
width: 140,
margin: 38,
visible: 4,
step: 1,
orientation: "horizontal"
}
var type = $(this).attr('data-type');
if (type == 'galeries') options.height = 135;
else if (type == 'movies') options.height = 163;
else if( type == 'eventos' ){
options = {
width: 470,
margin: 0,
height: 137,
visible: 4,
step: 1,
orientation: 'vertical'
}
}
$(this).rcarousel(options);
});