Created
August 22, 2014 09:04
-
-
Save icyflame/53cf7b2e6657cfc513cf to your computer and use it in GitHub Desktop.
The Bootstrap JavaScript carousel Slider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<div class="container-fluid"> | |
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="width: 100%; height: 95%; text-align: center;"> | |
<!-- Indicators --> | |
<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> | |
</ol> | |
<!-- Wrapper for slides --> | |
<div class="carousel-inner" > | |
<div class="item active"> | |
<img src="http://picbook.in/wp-content/uploads/2014/07/google_images_-_photos_videos.jpg" alt="Some Image 1"> | |
<div class="carousel-caption"> | |
Some Image 1 | |
</div> | |
</div> | |
<div class="item"> | |
<img src="http://www.infran.ru/labs/foto/Institute_Koltushy1.jpg" alt="Some image 2"> | |
<div class="carousel-caption"> | |
Some Image 2 | |
</div> | |
</div> | |
</div> | |
<!-- Controls --> | |
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> | |
<span class="glyphicon glyphicon-chevron-left"></span> | |
</a> | |
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> | |
<span class="glyphicon glyphicon-chevron-right"></span> | |
</a> | |
</div> | |
</div> | |
</body> | |
<script> | |
$(document).ready(function(){ | |
$('.carousel').carousel({ | |
interval: 100, | |
pause: "hover" | |
}) | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment