Issue
Slideshow like this one
https://jsfiddle.net/gh/get/jquery/2.2/chennighan/RapidlyPrototypeJavaScript/tree/master/lesson3/
How do i get it to stop going through the slides automatically?
<div class="carouselContainer">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="https://unsplash.it/g/1200/300" alt="image 1">
<div class="carousel-caption">
Some Caption 1 text
</div>
</div>
<div class="item">
<img src="https://unsplash.it/1200/300" alt="image 2">
<div class="carousel-caption">
Different Caption 2 text
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
Solution
You can use the interval parameter in your javascript to stop it for going through the slides, here is an example :
$(function() {
$('.carousel').carousel({
interval: false
});
});
Answered By - Reda Bourial
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.