In my application I want an automatic slide show with play 开发者_运维技巧and pause buttons.
- See this sample http://www.slidesjs.com/examples/playing/
- Use this JS lib http://www.slidesjs.com/
do like this
<div class="container">
<div id="slides">
<img src="img/example-slide-1.jpg">
<img src="img/example-slide-2.jpg">
<img src="img/example-slide-3.jpg">
<img src="img/example-slide-4.jpg"">
</div>
</div>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://www.slidesjs.com/examples/playing/js/jquery.slides.min.js"></script>
<script>
$(function() {
$('#slides').slidesjs({
width: 940,
height: 528,
play: {
active: true,
auto: true,
interval: 4000,
swap: true,
pauseOnHover: true,
restartDelay: 2500
}
});
});
</script>
精彩评论