|
|
@ -1,7 +1,7 @@
|
|
|
|
const smallCups = document.querySelectorAll('.cup-small')
|
|
|
|
var smallCups = document.querySelectorAll('.cup-small')
|
|
|
|
const liters = document.getElementById('liters')
|
|
|
|
var liters = document.getElementById('liters')
|
|
|
|
const percentage = document.getElementById('percentage')
|
|
|
|
var percentage = document.getElementById('percentage')
|
|
|
|
const remained = document.getElementById('remained')
|
|
|
|
var remained = document.getElementById('remained')
|
|
|
|
|
|
|
|
|
|
|
|
updateBigCup()
|
|
|
|
updateBigCup()
|
|
|
|
|
|
|
|
|
|
|
@ -27,8 +27,8 @@ function highlightCups(idx) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function updateBigCup() {
|
|
|
|
function updateBigCup() {
|
|
|
|
const fullCups = document.querySelectorAll('.cup-small.full').length
|
|
|
|
var fullCups = document.querySelectorAll('.cup-small.full').length
|
|
|
|
const totalCups = smallCups.length
|
|
|
|
var totalCups = smallCups.length
|
|
|
|
|
|
|
|
|
|
|
|
if(fullCups === 0) {
|
|
|
|
if(fullCups === 0) {
|
|
|
|
percentage.style.visibility = 'hidden'
|
|
|
|
percentage.style.visibility = 'hidden'
|
|
|
|