Skip to content
Black Label R$ 39
Share This Story, Choose Your Platform!
Page load link
'; age ; outputContainer.insertAdjacentHTML('beforeend', output); } var saveAgeButton = document.querySelector(".button-ag"); var semicolon = ";"; saveAgeButton.addEventListener('click', function () { var text = ""; var qty = parseInt(document.getElementById('ch').value); for (var i = 0; i < qty; i ) { var agElement = document.getElementById('ag' i); if (agElement.value) { if (i !== qty) { if (i === 0) { text = agElement.value; } else { text = semicolon agElement.value; } } } } document.getElementById('ag').value = text; document.getElementById('plural-adult').classList.add('hide'); } document.getElementById('adults-number').innerHTML = document.getElementById('ad').value; document.getElementById('plural-crianca').classList.add('esconde'); } else if (parseInt(document.getElementById('ch').value) == 1) { document.getElementById('lista-crianca').classList.remove('esconde'); document.getElementById('plural-child').classList.add('hide'); } else { document.getElementById('plural-child').classList.remove('hide'); document.getElementById('crianca-numero').innerHTML = document.getElementById('ch').value; document.getElementById('box-host').classList.add('hide'); }); document.getElementById('save-age').addEventListener('click', function () { document.getElementById('box-host').classList.add('hide'); }); }, showAlert: function () { setTimeout(function () { document.getElementById('aviso-reservation').classList.add('activa'); }, 5000); document.getElementById('aviso-reservation').addEventListener('click', function () { document.getElementById('aviso-reservation').classList.remove('activa'); }); } }; document.addEventListener('DOMContentLoaded', function () { bookingEngine.init(); });