Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Good or bad practice to hide elements with CSS, as opposed to doing it with jQuery… Re: Good or bad practice to hide elements with CSS, as opposed to doing it with jQuery…

#135364
TheDoc
Member

You could use a `.no-js` class on your `` to target users that have JS disabled and then make sure it’s visible for them.

You simply remove the class with JS and then users that have JS enabled will have it hidden for them. This type of practice is pretty common this days, especially when using Modernizr (I believe it has this functionality built in).