I need help to create a vertical image slider which slides the image automatically with interval.
HTML:
<div id="myCarousel" class="carousel slide">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="img/1.jpg" />
</div>
<div class="item">
<img src="img/2.jpg" />
</div>
<div class="item">
<img src="img/3.jpg" />
</div>
<div class="item">
<img src="img/4.jpg" />
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
Javascript:
<script type="text/javascript">
$(document).ready(function () {
$('.carousel').carousel({ interval: 3000 });
});
</script>
I need the same thing vertically.
I need help to create a vertical image slider which slides the image automatically with interval.
HTML:
<div id="myCarousel" class="carousel slide">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="img/1.jpg" />
</div>
<div class="item">
<img src="img/2.jpg" />
</div>
<div class="item">
<img src="img/3.jpg" />
</div>
<div class="item">
<img src="img/4.jpg" />
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
Javascript:
<script type="text/javascript">
$(document).ready(function () {
$('.carousel').carousel({ interval: 3000 });
});
</script>
I need the same thing vertically.
Share Improve this question edited Dec 15, 2012 at 21:25 JSW189 6,33312 gold badges46 silver badges73 bronze badges asked Dec 15, 2012 at 10:55 KowshikKowshik 731 gold badge2 silver badges9 bronze badges 4- You can see the other carousals for hint which save a lot of time and queries here. – w3uiguru Commented Dec 15, 2012 at 11:09
- It is a horizontal one. I used the twitter bootstrap carousel. Its for horizontal only. But is it possible to make it vertical here in jquery?.. – Kowshik Commented Dec 15, 2012 at 11:12
- 1 In jquery everything is possible but we have to code for that which is not easy here bro. – w3uiguru Commented Dec 15, 2012 at 11:14
-
You can also use CSS3 for this using the
@keyframes
rule. – interesting-name-here Commented May 4, 2016 at 12:42
4 Answers
Reset to default 1I would suggest you to use jCarousel or bxslider. Take a look at this and this for vertical-scroll example pf jCarousel and this for bxslider example
Here is a sample of how to use CSS3 and HTML5 to get the effect of a vertical slider.
https://jsfiddle/cd3oezzj/
Uses @keyframes
rule. @-webkit-keyframes
may be required for some browsers.
You can use
$(window).scrollTop()
just put this below:
<script src= "http://ajax.googleapis./ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src= "js/bootstrap.js"></script>
<script type="text/javascript">
var $ = jQuery.noConflict();
$(document).ready(function() {
$('#myCarousel').carousel({ interval: 2000, cycle: true });
});
</script>
plz maimtain the sequence as i maintain...
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745358573a4624255.html
评论列表(0条)