1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/js/tests/visual/carousel.html

57 lines
2.3 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
2016-11-12 10:12:58 -05:00
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<title>Carousel</title>
</head>
<body>
<div class="container">
<h1>Carousel <small>Bootstrap Visual Test</small></h1>
2016-11-12 10:12:58 -05:00
<p>Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p>
2016-11-12 10:12:58 -05:00
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
2016-11-12 10:12:58 -05:00
<div class="carousel-item active">
<img src="https://37.media.tumblr.com/tumblr_m8tay0JcfG1qa42jro1_1280.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img src="https://37.media.tumblr.com/tumblr_m8tazfiVYJ1qa42jro1_1280.jpg" alt="Second slide">
</div>
<div class="carousel-item">
<img src="https://38.media.tumblr.com/tumblr_m8tb2rVsD31qa42jro1_1280.jpg" alt="Third slide">
</div>
</div>
2016-12-30 05:29:47 -05:00
<a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
2016-11-12 10:12:58 -05:00
<span class="sr-only">Previous</span>
</a>
2016-12-30 05:29:47 -05:00
<a class="carousel-control-next" href="#carousel-example-generic" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
2016-11-12 10:12:58 -05:00
<span class="sr-only">Next</span>
</a>
</div>
</div>
<script src="../../../docs/assets/js/vendor/jquery-slim.min.js"></script>
2016-11-12 10:12:58 -05:00
<script src="../../dist/util.js"></script>
<script src="../../dist/carousel.js"></script>
2016-11-12 10:12:58 -05:00
<script>
$(function() {
2016-11-12 10:12:58 -05:00
// Test to show that the carousel doesn't slide when the current tab isn't visible
$('#carousel-example-generic').on('slid.bs.carousel', function(event) {
2016-11-12 10:12:58 -05:00
console.log('slid at ', event.timeStamp)
})
})
</script>
</body>
</html>