KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
gaming
★ 15
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
AP33772S-Cpp
:
Hardware independent code for AP33772S. Originally written for PicoPD Pro
15khz
:
No description available.
openvocs
:
Official openvocs repository
BoiteAOutilsLegistique
:
📖 Application développée pour simplifier l'analyse et la gestion des textes juridiques français et européens en utilisant des modèles d'IA.
roll-your-own-edr
:
No description available.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
gaming
?
Download (.md)
# gaming const container = document.querySelector('.container'); const seats = document.querySelectorAll('.row .seat:not(.occupied)'); const count = document.getElementById('count'); const total = document.getElementById('total'); const movieSelect = document.getElementById('movie'); let ticketPrice = +movieSelect.value; // Update total and count function updateSelectedCount() { const selectedSeats = document.querySelectorAll('.row .seat.selected'); const selectedSeatsCount = selectedSeats.length; const seatIndex = [...selectedSeats].map(seat => [...seats].indexOf(seat)); count.innerText = selectedSeatsCount; total.innerText = selectedSeatsCount * ticketPrice; } // Movie select event movieSelect.addEventListener('change', (e) => { ticketPrice = +e.target.value; updateSelectedCount(); }); // Seat click event container.addEventListener('click', (e) => { if (e.target.classList.contains('seat') && !e.target.classList.contains('occupied')) { e.target.classList.toggle('selected'); updateSelectedCount(); } }); // Confirm Booking function confirmBooking() { const selectedSeats = document.querySelectorAll('.row .seat.selected'); if (selectedSeats.length > 0) { alert("Booking Confirmed! Enjoy the show!"); } else { alert("Please select a seat before confirming the booking."); } }