Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tela de avaliação responsiva utilizando CSS e Javascript

@mailacss

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@fico444

Posted

Hi Maila it's a nice solution. I only found a detail: If the user does not select any rating and presses submit, the script shows the thank you card. It must show a warning or a message. You can solve this by declaring ex as a global variable, calling from the HTML only the hide function, and adding a check inside it. Something like this...

var ex = 0;

function esconde(el) {

 if( ex == 0 ){
  alert("message");
}else{
     var display = document.getElementById(el).style.display;
     if(display == "none")
          document.getElementById(el).style.display = 'block';
      else
      document.getElementById(el).style.display = 'none';
      mostra(el);
 }

}

I didn't test it so it may have some error but that would be the idea... I hope I have helped, regards 😉

Marked as helpful

1

@mailacss

Posted

@fico444 Done, thank you!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord