Reputation: 625
I have some trouble with a bootstrap carousel. When I use the data-interval="true" option the carousel starts automatic as it should. The problem it is spinning like crazy.
How do I make the pause time of the carousel longer?
Code I'm using:
<div id="myCarousel2" class="carousel slide" data-ride="carousel" data-interval="true">
I did tried to override the .JS files and .css files but this won't help.
Thanks in advance.
Upvotes: 1
Views: 398
Reputation: 21663
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval=""
You're using data-interval="true"
this should be a number or "false" (if you don't want it to automatically cycle).
For instance > data-interval="2000"
and the default is 5000 without setting any data-attribute
.
See working example Snippet and Docs.
@font-face {
font-family: Museo;
src: url("../fonts/Museo-500.otf") format("opentype");
}
body {
color: #383838;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
.white {
background-color: #FFFFFF;
}
p {
line-height: 20px!important;
}
.excerpt {
line-height: 24px!important;
}
.jumbotron-header {
height: 600px;
padding: 0px;
margin-top: 18px!important;
}
.jumbotron-content {
color: #FFFFFF;
padding-top: 480px;
text-align: center;
}
.formulier {
padding: 40px 0px;
}
.countdown {
width: 100px;
z-index: 999;
position: absolute;
}
.ribbon {
height: 184px;
}
.img-nieuws {
background-color: #FFFFFF;
margin-right: 15px;
padding: 0px;
}
.img-nieuws-featured {
height: 200px;
padding: 15px;
}
.avatar {
display: block;
max-width: 100%;
height: auto;
}
.logo {
margin-top: -15px;
position: absolute;
z-index: 10;
pointer-events: none;
}
.blue {
color: #1078b9;
}
.blue-light {
background-color: #93d7e8;
}
.blue-dark {
background-color: #1178b9;
border-top: solid 16px #93d7e8;
border-bottom: solid 16px #93d7e8;
color: #FFFFFF;
}
.blue-line {
border-bottom: solid 2px #93d7e8;
margin-bottom: 20px;
}
.red {
color: #dc011b;
}
.red-light {
background-color: #e9021d;
}
.red-dark {
background-color: #e9021d;
border-top: solid 16px #cb0119;
border-bottom: solid 16px #cb0119;
color: #FFFFFF;
}
.orange-dark {
background-color: #fde0c5;
border-top: solid 16px #cb0119;
border-bottom: solid 16px #cb0119;
color: #FFFFFF;
}
.deelnemer {
border-bottom: 1px solid #e9021d;
margin-top: 10px;
padding-bottom: 10px;
margin-bottom: 20px;
}
.btn-social-icon {
border-radius: 0px;
}
.btn-default {
background-color: #f6ad65!important;
color: #FFFFFF!important;
}
.nieuws-facebook {
height: 400px;
}
.laatste-nieuws {
background-color: #e9021d;
line-height: 34px;
margin-bottom: 14px;
}
a.whitelink:link,
a.whitelink:hover,
a.whitelink:visited,
a.whitelink:active {
color: #FFF;
font-weight: 700;
}
.orange {
color: #f29400;
}
.orange-light {
color: #f8b333;
}
.orange-dark {
background-color: #f29400;
border-top: solid 16px #f8b333;
border-bottom: solid 16px #f8b333;
color: #FFFFFF;
}
.sponsoren {
height: 200px;
padding-top: 30px;
}
.form-control {
height: 45px;
border-radius: 5px;
border: 0px 0px 2px 0px;
}
.control-label {
font-weight: normal;
}
/* SPACEING */
.single {
margin-top: 100px;
}
.formulier {
margin: 50px auto;
}
.biografie {
margin-bottom: 20px;
}
.footer {
margin-top: 40px;
border-top: 16px solid #dc011b;
;
padding-top: 20px;
}
ul.footer-links > li {
margin-bottom: 14px;
font-size: 14px;
}
ul.footer-links > li > a {
color: #000;
}
.space {
padding-left: 25px!important;
font-size: 16px!important;
line-height: 90px!important;
}
img.post-header {
margin-bottom: 15px;
}
img.box {
border-radius: 15px!important;
border: 2px solid #dc011b;
height: 98px;
margin-top: 20px;
}
/* LEADERBOARDS */
.number {
font-size: 24px;
margin-right: 20px;
color: #FFFFFF;
}
.number-1 {
font-size: 24px;
margin-right: 20px;
color: #FFFFFF;
}
.number-2 {
font-size: 24px;
margin-right: 15px;
color: #FFFFFF;
}
.number-3 {
font-size: 24px;
margin-right: 17px;
color: #FFFFFF;
}
.number-rest {
font-size: 16px;
margin-right: 28px;
}
.number-rest-10 {
font-size: 16px;
margin-right: 18px;
}
.gold {
font-size: 26px;
background-image: url('../images/gold.png');
background-repeat: no-repeat;
padding-left: 12px;
margin-bottom: 10px;
}
.silver {
font-size: 22px;
background-image: url('../images/silver.png');
background-repeat: no-repeat;
padding-left: 11px;
margin-bottom: 10px;
}
.bronze {
font-size: 18px;
background-image: url('../images/bronze.png');
background-repeat: no-repeat;
padding-left: 11px;
margin-bottom: 10px;
}
.rest {
font-size: 16px;
padding-left: 14px;
}
ul {
margin-left: -20px;
font-style: Museo;
}
.leaderboards > ul {
list-style: none;
margin-left: -40px!important;
}
.leaderboards {
line-height: 36px;
}
img.pull-left {
margin-left: -15px;
}
.red-light-border {
border-radius: 10px;
}
h2 a {
color: #ed2e38;
}
h1,
h2,
h3,
h4 {
font-family: Museo;
}
h1 {
font-size: 46px;
}
h1.space-top {
margin-top: -10px;
}
h1.post-title {
font-size: 32px;
}
h3 {
line-height: 32px;
}
.big {
font-size: 38px;
}
.white {
background-color: #FFFFFF;
color: #383838;
}
.img-right {
margin-right: 20px;
}
.grey-dark {
background-color: #262f38;
}
.center {
text-align: center;
}
.carousel-control {
background: none!important;
}
#marathonlopers {
height: 590px;
}
.btn {
font-family: Museo;
color: #FFFFFF;
}
.btn-full {
width: 100%;
}
.btn-white {
background-color: #FFFFFF;
color: #383838!important;
}
.btn-search {
background-color: #0c6094;
color: #FFFFFF;
}
.btn-xl {
height: 100px!important;
text-align: left;
padding-top: 20px!important;
width: 100%;
}
.full-width {
width: 100%!important;
}
.h3-btn {
margin-top: 0px!important;
}
/* THEME DEBUG */
.grey {
background-color: #CCCCCC;
}
.btn-default {
background-color: #1178b9;
color: #383838;
border: 0px;
height: 40px;
padding-top: 8px;
font-size: 18px;
}
.btn-danger {
background-color: #dc011b;
color: #FFFFFF;
border: 0px;
height: 40px;
padding-top: 8px;
font-size: 18px;
}
/* NAVBAR */
.navbar-header {
width: 160px;
}
.navbar {
margin-bottom: 0px;
background-color: #dc011b;
border-radius: 0 !important;
-moz-border-radius: 0 !important;
font-family: Museo;
font-size: 18px;
border: 0px;
}
.navbar-default .navbar-brand {
color: #ffffff;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #FFFFFF;
}
.navbar-default .navbar-nav > li > a {
color: #ffffff;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #FFFFFF;
background-color: #dc011b;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .active > a:active {
color: #FFFFFF;
background-color: #cb0119;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: #FFFFFF;
background-color: #cb0119;
}
.navbar-default .navbar-nav > li > .dropdown-menu {
background-color: #dc011b;
border: none;
}
.navbar-default .navbar-nav > li > .dropdown-menu > li > a {
color: #FFFFFF;
}
.navbar-default .navbar-nav > li > .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav > li > .dropdown-menu > li > a:focus {
color: #FFFFFF;
background-color: #dc011b;
}
.navbar-default .navbar-nav > li > .dropdown-menu > li > .divider {
background-color: #dc011b;
}
.dropdown-menu > li.kopie > a {
padding-left: 5px;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #fff;
text-decoration: none;
background-color: #cb0119;
outline: 0;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu > a:after {
border-color: transparent transparent transparent #333;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
display: block;
float: right;
height: 0;
margin-right: -10px;
margin-top: 5px;
width: 0;
}
.dropdown-submenu:hover>a:after {
border-left-color: #555;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > .active > a:hover {
text-decoration: underline;
}
/* TABLES */
.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
}
.table > thead > tr > th {
vertical-align: bottom;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {} .table > tbody + tbody {} .table .table {
background-color: #fff;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 5px;
}
.table-bordered {} .table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {} .table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {} .table-striped > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
color: #383838;
}
.table-striped > tbody > tr:nth-of-type(even) {
background-color: #CCC;
color: #383838;
}
.table-hover > tbody > tr:hover {
background-color: #f5f5f5;
}
table col[class*="col-"] {
position: static;
display: table-column;
float: none;
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
display: table-cell;
float: none;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color: #f5f5f5;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color: #e8e8e8;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
background-color: #dff0d8;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
background-color: #d0e9c6;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
background-color: #d9edf7;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
background-color: #c4e3f3;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
background-color: #fcf8e3;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
background-color: #faf2cc;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
background-color: #f2dede;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
background-color: #ebcccc;
}
@media (max-width: 767px) {
.ribbon {
height: 344px;
}
.nieuws-facebook {
height: 460px;
}
.navbar-nav {
display: inline;
}
.navbar-default .navbar-brand {
display: inline;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-default .navbar-nav .dropdown-menu > li > a {
color: red;
background-color: #ccc;
border-radius: 4px;
margin-top: 2px;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #333;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
background-color: #ccc;
}
.navbar-nav .open .dropdown-menu {
border-bottom: 1px solid white;
border-radius: 0;
}
.dropdown-menu {
padding-left: 10px;
}
.dropdown-menu .dropdown-menu {
padding-left: 20px;
}
.dropdown-menu .dropdown-menu .dropdown-menu {
padding-left: 30px;
}
li.dropdown.open {
border: 0px solid red;
}
}
@media (min-width: 768px) {
ul.nav li:hover > ul.dropdown-menu {
display: block;
}
#navbar {
text-align: center;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron jumbotron-header grey-dark">
<div id="myCarousel2" class="carousel slide" data-ride="carousel" data-interval="2000">
<div class="carousel-inner" role="listbox">
<div class="item jumbotron-content" style="background-image:url('http://www.loopvoorcliniclowns.be/nym-2016/wp-content/uploads/2015/11/result.jpg');width: 100%;height: 600px;display: cover;background-position: center center; background-repeat: no-repeat;background-size: cover;">
<div class="container">
<h2></h2>
<h1>Onbetaalbaar, de lach van een kind</h1>
<h2>
</h2>
</div>
</div>
<div class="item jumbotron-content" style="background-image:url('http://www.loopvoorcliniclowns.be/nym-2016/wp-content/uploads/2015/10/Medaille-2015.jpg');width: 100%;height: 600px;display: cover;background-position: center center; background-repeat: no-repeat;background-size: cover;">
<div class="container">
<h2></h2>
<h1>Voor jou in 2016?</h1>
<h2>
</h2>
</div>
</div>
<div class="item jumbotron-content active left" style="background-image:url('http://www.loopvoorcliniclowns.be/nym-2016/wp-content/uploads/2015/10/Neus-slider.jpg');width: 100%;height: 600px;display: cover;background-position: center center; background-repeat: no-repeat;background-size: cover;">
<div class="container">
<h2></h2>
<h1>Loop NY Marathon voor Cliniclowns!</h1>
<h2>
</h2>
</div>
</div>
<div class="item jumbotron-content next left" style="background-image:url('http://www.loopvoorcliniclowns.be/nym-2016/wp-content/uploads/2015/11/30C8298-94_opt.jpg');width: 100%;height: 600px;display: cover;background-position: center center; background-repeat: no-repeat;background-size: cover;">
<div class="container">
<h2></h2>
<h1>Cliniclown in actie</h1>
<h2>
</h2>
</div>
</div>
<div class="item jumbotron-content" style="background-image:url('http://www.loopvoorcliniclowns.be/nym-2016/wp-content/uploads/2015/10/Five-boroughs.jpg');width: 100%;height: 600px;display: cover;background-position: center center; background-repeat: no-repeat;background-size: cover;">
<div class="container">
<h2></h2>
<h2>
</h2>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control hidden-xs" href="#myCarousel2" 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 hidden-xs" href="#myCarousel2" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="orange-dark">
<div class="jumbotron-h1"></div>
<div id="marathonlopers" class="carousel slide" data-ride="carousel" data-interval="false">
<div class="carousel-inner" role="listbox">
<div class="item active">
<div class="container">Other caroucel slide</div>
</div>
<div class="item">
<div class="container">Other caroucel slide</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control hidden-xs" href="#marathonlopers" 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 hidden-xs" href="#marathonlopers" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
Upvotes: 3