문제

I'm using tiny carousel for my current school project. everything is working fine except for the autoplay.

Here is the code for autoplay and animation config:

$("#upcoming").tinycarousel({ interval: true });
var upcoming = $("#upcoming").data("plugin_tinycarousel");

upcoming.start();
//for carousel
$("#upcoming").tinycarousel({
      axis   : "y",
      animationTime: 500,
      infinite: true
});

When I included

$("#upcoming").tinycarousel({ interval: true });
var upcoming = $("#upcoming").data("plugin_tinycarousel");

upcoming.start();

My carousel that animates vertically is now horizontal. Can anyone tell me why is this happening?

도움이 되었습니까?

해결책

By default the plugin's setting axis is x = horizontal. You need to set it to y.

$("#upcoming").tinycarousel({ interval: true, axis: 'y' });
var upcoming = $("#upcoming").data("plugin_tinycarousel");

upcoming.start();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top