FinderBurger
by murgiaMarco
HTML
<ul id="containerTable" class="no-bullets">
<li><button class="accordion">
<div class="row">
<div class="col-1 accordionIcon"></div>
<div class="col-2">
2.68%
</div>
<div class="col-1">
Calcio
</div>
<div class="col-3">
Italia - Marocco
</div>
<div class="col-3">
17 ottobre 2023 18:00
</div>
<div class="col-2">
1.59/2.95
</div>
</div>
</button>
<div class="panel">
<div class="row">
<div class="col-3">
Italia - Marocco
</div>
<div class="col-3">
17 ottobre 2023 18:00
</div>
<div class="col-3">
<input class="counterInput" type="number" id="quantity" name="quantity" min="1" value="100">
<input class="counterInput" type="number" id="quantity2" name="quantity" min="1" value="80">
</div>
<div class="col-1">
8,28€
</div>
</div>
</div>
</li>
</ul>
CSS
* {
box-sizing: border-box;
}
.row::after {
content: "";
clear: both;
display: table;
}
[class*="col-"] {
float: left;
padding: 15px;
}
.col {width: 8.33%;}
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 6px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
transition: 0.4s;
}
.accordion div {
border:0.04rem solid white;
}
.active, .accordion:hover {
background-color: #eaffe4;
}
.counterInput{
width:4rem;
}
.panel {
padding: 0 18px;
background-color: white;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
border:0.04rem solid lightgrey;
}
.accordionIcon:after {
content: '\02795'; /* Unicode character for "plus" sign (+) */
font-size: 13px;
color: #777;
float: left;
margin-right: 5px;
}
.active .accordionIcon:after {
content: "\2796"; /* Unicode character for "minus" sign (-) */
}
ul.no-bullets {
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: scroll;
height: 200px;
}
JavaScript
var dataTest = `{"limit":10,"total_by_filter":0,"total":0,"request_domain":"rest-api-pr.betburger.com","bets":[{"home":"Blanchet, Ugo","away":"Kolar, Zdenek","started_at":1697550600,"league":"Tennis. ATP Challenger Tour. Olbia, Italy. Singles. Round of 32","bookmaker_league_id":116116344,"sport_id":8,"home_id":1562684289,"away_id":2756908,"team_home_id":546603,"team_away_id":113712,"team_away":"Kolar, Zdenek","league_id":26155,"league_name":"World. ATP. Olbia. Singles","updated_at":1697491362,"swap_teams":false,"bookmaker_event_name":"Blanchet, Ugo - Kolar, Zdenek","bookmaker_league_name":"Tennis. ATP Challenger Tour. Olbia, Italy. Singles. Round of 32","event_name":"Blanchet, Ugo - Kolar, Zdenek","team2_name":"Kolar, Zdenek","team1_name":"Blanchet, Ugo","raw_id":"15758725","version":0,"id":"MTA5NTg2OTEyNHwxOSw5LjUsNSwwLDAsMA","koef":2.02,"commission":0,"diff":1,"player":false,"corner":false,"bookmaker_event_id":1095869124,"event_id":396009192,"bookmaker_id":4,"period_id":5,"bc_id":496,"direct_link":"","koef_lay":0,"is_lay":0,"market_depth":0,"is_original":1,"market_and_bet_type":19,"market_and_bet_type_param":9.5,"player1_id":0,"player2_id":0,"current_score":"","is_live":0,"scanned_at":1697491518438,"recorded_at":0,"kafka_message_offset":0,"koef_last_modified_at":1697491362526,"bookmaker_event_direct_link":""},{"home":"Ugo Blanchet","away":"Zdenek Kolar","started_at":1697533200,"league":"ATP Olbia Challenger Italy","bookmaker_league_id":116127573,"sport_id":8,"home_id":239486668444,"away_id":239484930018,"team_home_id":546603,"team_away_id":113712,"team_away":"Kolar, Zdenek","league_id":26155,"league_name":"World. ATP. Olbia. Singles","updated_at":1697487584,"swap_teams":false,"bookmaker_event_name":"Ugo Blanchet - Zdenek Kolar","bookmaker_league_name":"ATP Olbia Challenger Italy","event_name":"Ugo Blanchet - Zdenek Kolar","team2_name":"Zdenek Kolar","team1_name":"Ugo...