JQuery Cycle2 carousel-slide-size - width / height

this page says that you can set the width and height of each slide:

http://jquery.malsup.com/cycle2/demo/carousel.php

carousel-slide-size = width (horz carousel) or height (vertical carousel) of each slide. If this option is not set, the value will be displayed from the first values โ€‹โ€‹of the slide.

but how can I accurately add it to the code? This is not clear:

<div class="slideshow" data-cycle-fx=carousel data-cycle-timeout=1000 > <img src="http://malsup.github.com/images/beach1.jpg"> <img src="http://malsup.github.com/images/beach2.jpg"> ... <img src="http://malsup.github.com/images/beach9.jpg"> </div> 
+1
source share
1 answer

All attributes with loop2 are preceded by "data-cycle-", so for a carousel slide you just add like this:

 data-cycle-carousel-slide-dimension=300 

in your slideshow div (and any dimension).

Hope this helps!

+1
source

Source: https://habr.com/ru/post/1480456/


All Articles