Today I discovered owl-carousel
and I have been trying to get it to work.
I'm trying to make a carousel that cycles through images of dinosaurs. The problem is that 4 dinosaurs show up on the same slide(2 in the fiddle half-sized window). I wanted only 1 to show up per slide.
I have a fiddle
http://jsfiddle.net/8bJUc/318/
JavaScript
<script>
$(document).ready(function(){
$("#dino-example").owlCarousel({
items: 5
});
});
</script>
HTML
<div id="dino-example" class="dino-carousel">
<div class="item">
<img src="http://johntomsett.files.wordpress.com/2014/03/14525_1_v12_tp.jpg" alt="dinosaur1"></img>
</div>
<div class="item">
<img src="http://images.clipartpanda.com/t-rex-dinosaur-clip-art-T-Rex-Dinosaur_1.png" alt="dinosaur2"></img>
</div>
<div class="item">
<img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQbuwkU3kDpr4rByYQ3ydbTPv6zP1L0yhrKB00fa5YhkY0i9WKFWA" alt="dinosaur3"></img>
</div>
<div class="item">
<img src="http://content.animalnewyork.com/wp-content/uploads/new-dinosaur-nasutoceratops.jpg" alt="dinosaur4"></img>
</div>
</div>
CSS
img {
height: 300px;
width: 300px;
}
I tried changing items
to 1, but that didn't solve it either.
Does anyone know how to solve this?
Help is appreciated.
In order to stop owl auto play you can trigger the corresponding event: stop. owl.
Responsive Owl-carousel Slider [Source Codes] First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file. First, create an HTML file with the name of index. html and paste the given codes in your HTML file.
This also says pagination (dots) can be turned off with: pagination: false, The dots: false, is for version 2.
singleItem
property needs to be true
$(document).ready(function() {
$("#dino-example").owlCarousel({
items: 5,
singleItem: true
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With