Fix on a11y carousel play/pause btn
This commit is contained in:
parent
b03b30d340
commit
6ece10e737
2 changed files with 7 additions and 3 deletions
|
|
@ -23,9 +23,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
if (!isRunning) {
|
||||
playPauseBtn.children.item(0)?.classList.remove("d-none");
|
||||
playPauseBtn.children.item(1)?.classList.add("d-none");
|
||||
playPauseBtn.setAttribute('title', String(playPauseBtn.dataset['play']));
|
||||
} else {
|
||||
playPauseBtn.children.item(0)?.classList.add("d-none");
|
||||
playPauseBtn.children.item(1)?.classList.remove("d-none");
|
||||
playPauseBtn.setAttribute('title', String(playPauseBtn.dataset['stop']));
|
||||
}
|
||||
};
|
||||
playPauseBtn.addEventListener("click", () => {
|
||||
|
|
|
|||
|
|
@ -137,9 +137,11 @@
|
|||
|
||||
<div class="carousel slide mt-5" id="carousel-lots" data-bs-pause="false" data-bs-touch="true">
|
||||
<div class="carousel-indicators">
|
||||
<button class="btn-control btn btn-sm btn-link ms-1 mt-1" id="coupons-carousel-play-btn">
|
||||
<i class="fa-solid fa-play"></i>
|
||||
<i class="fa-solid fa-pause d-none"></i>
|
||||
<button class="btn-control btn btn-sm btn-link ms-1 mt-1" id="coupons-carousel-play-btn"
|
||||
data-stop="{{ __('Arrêter le carousel') }}" data-play="{{ __('Lancer le carousel') }}" type="button"
|
||||
title="{{ __('Lancer ou arrêter le carousel') }}">
|
||||
<i class="fa-solid fa-play" aria-hidden="true"></i>
|
||||
<i class="fa-solid fa-pause d-none" aria-hidden="true"></i>
|
||||
</button>
|
||||
@foreach ($prizesGlobal as $prizeIndex => $prizeModel)
|
||||
<button class="bg-quint @if ($loop->first) active @endif" data-bs-target="#carousel-lots"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue