Skip to content

24 ways to impress your friends

Vote up?


The best approach, IMO, with respect to styling the box to hidden, is set the class in JavaScript and display: none; in the CSS file.

That means you keep the behaviour in the JavaScript and styling in the CSS. How it’s supposed to be!

That means, when the user turns off stylesheets, it’s not affected by the JavaScript…