Why is there a need to hide elements ?

30th Dec 2016, 2:45 PM
2 Answers
+ 2
example: when inserting a correct e-mail in a form with JavaScript DOM, the div "error" is default hidden, but if there's a wrong e-mail, JavaScript DOM will change the element's visibility ans show the error.
30th Dec 2016, 2:46 PM
For example, I set my first select option to display none, so when the user clicks on the select, the first option won't be shown and force the user to select one of the other options. Let's say my first option display the text "select an option", this is not a right option for the webpage, when user clicks the select, this "select an option" option, won't be shown <option style = 'display : none' > Select an option <option> and the user can't select this option.
26th Feb 2017, 4:36 PM
Santiago Ayala
Santiago Ayala - avatar