user1937021
user1937021

Reputation: 10771

carousel-slide-dimension on Jquery Cycle2 -fixed width/height

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

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

carousel-slide-dimension = The width (horz carousel) or height (vert carousel) of each slide. If this option is not set the value will be inferred from the first slide's dimensions.

but how do I exactly add it to the code? It's 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>

Upvotes: 1

Views: 4621

Answers (1)

Jesse
Jesse

Reputation: 111

All the attributes with cycle2 are preceded by "data-cycle-" so for carousel-slide-dimension, you simply add that like so:

data-cycle-carousel-slide-dimension=300

in your slideshow div (and whatever dimension).

Hope this helps!

Upvotes: 1

Related Questions