I have the game marker structure, but would like to be able to add, more than one game in progress.
I would like to be able to create a Slider where the next container <div class="item"></div>
passes the other container for certain x
minutes.
How can I implement a very simple simple slider for what I want?
.upcoming-section {
text-align: center;
padding: 93px 0 98px;
}
.upcoming-section .container {
max-width: 900px;
margin: 0 auto;
}
.upcoming-section h2 {
text-align: center;
color: #000;
margin-bottom: 40px;
font-weight: 600;
letter-spacing: 1px;
}
.upcoming-section h4 {
color: #000;
font-size: 15px;
font-weight: 400;
margin: 14px 0 0;
text-transform: uppercase;
}
.upcoming-section span.date {
padding-top: 10px;
font-weight: 500;
font-family: 'Poppins', sans-serif;
font-size: 18px;
}
.upcoming-section span {
display: block;
text-transform: uppercase;
font-size: 15px;
margin-right: 0;
}
.upcoming-section .vs {
color: #fbc02d;
font-size: 25px;
font-weight: 600;
padding: 50px 0;
}
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<div class="upcoming-section">
<div class="container">
<h2>Upcoming Match</h2>
<div id="upcoming" class="carousel">
<div class="item">
<div class="col-md-4 col-sm-4 col-xs-4">
<img src="https://ssl.gstatic.com/onebox/media/sports/logos/9toerdOg8xW4CRhDaZxsyw_96x96.png" alt="">
<h4>Trirsal</h4>
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<span class="date">JUNE 16, 17:00</span>
<span class="vs">VS</span>
<span>Central Olympic Stadium</span>
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<img src="https://ssl.gstatic.com/onebox/media/sports/logos/9toerdOg8xW4CRhDaZxsyw_96x96.png" alt="">
<h4>Kapa Club</h4>
</div>
</div>
<div class="item">
<div class="col-md-4 col-sm-4 col-xs-4">
<img src="https://ssl.gstatic.com/onebox/media/sports/logos/9toerdOg8xW4CRhDaZxsyw_96x96.png" alt="">
<h4>Trirsal</h4>
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<span class="date">JUNE 16, 17:00</span>
<span class="vs">VS</span>
<span>Central Olympic Stadium</span>
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<img src="https://ssl.gstatic.com/onebox/media/sports/logos/9toerdOg8xW4CRhDaZxsyw_96x96.png" alt="">
<h4>Kapa Club</h4>
</div>
</div>
</div>
</div>
</div>
A simple slider, something like that, how can I create it?
The bootstrap library itself that you have added allows you to create simple sliders.
https://getbootstrap.com/docs/3.3/javascript/#carousel
I found an article written on StackOverflow (English), based on the question where you indicate
The following code meets the question, it is structured in a simple way using only jQuery.
Original source, credits Praveen Kumar Purushothaman.
This code could help you, it was taken from http://jygproyectosweb.com/articulos/Slider-manual-infinito-sin-plugins :
Each game you have can be added inside the tags and the time can be controlled with the setInterval of the javascript autoplay() function, in this case it is 5 seconds (5000 ms). And if what you want is to increase or decrease slides, just add or remove section elements and in the css attribute .slider {width: 400%;} increase or decrease by 100% for each section added and removed respectively, in this as they are 4 slides the value is 400%.
CSS:
HTML:
JavaScript:
I hope it works for you.
Hello friend, say hello, I leave you a working example of " bxSlider " I use it often in my projects and it is quite easy to use. I hope you find it useful.