@PierreFrsSubmitted over 1 year ago
Hi, I submit my solution but I am not able, for some reason, to make the "submit" button work. Any advice on this ? I've read my code over and over but I am not able to find the problem... Thanks
Hi, I submit my solution but I am not able, for some reason, to make the "submit" button work. Any advice on this ? I've read my code over and over but I am not able to find the problem... Thanks
You are adding and removing the class 'hidden' inside the click event, but there is no hidden class in your css file.
submitBtn.addEventListener('click', () => {
if (rate) {
ratePoint.innerText = rate;
ratingSection.classList.add('hidden');
thankSection.classList.remove('hidden');
}
});
You are using the hidden attribute on your html element.
<div class="thank-section" hidden>
Here is what you could do:
.hidden{
display: none;
}
<div class="thank-section" hidden>
and add the hidden class
<div class="thank-section hidden" >
This should fix your problem.