@josh76543210
Posted
Hello @mossabboujnah,
Great job on your solution!
I noticed that when you submit the rating without selecting a number first it will submit and show "You selected out of 5". To prevent this error from occurring I would suggest checking if a number has been inserted when submiting the rating.
Adding a simple if statement should do the trick:
function handleSubmit(){
if(document.getElementById("yourRate").innerText){
document.getElementById("main").style.display = "none";
document.getElementById("feedback").style.display = "block";
document.getElementById("feedback").classList.add("animation");
}
}
Happy Coding!
Marked as helpful
@mossabboujnah
Posted
Thats true did not consider that , thank you for the feedback@josh76543210