👀 Behold: a brave attempt at a Zen riddle—how to hide #JavaScript elements without JavaScript 🤯. Spoiler alert: use JavaScript. 🧩 It's a #tutorial for those who enjoy reinventing the wheel with a square. 🚜
https://0xda.de/blog/2025/04/hiding-elements-that-require-javascript-without-javascript/ #ZenRiddle #WebDevelopment #CodingFun #ReinventingTheWheel #HackerNews #ngated
https://0xda.de/blog/2025/04/hiding-elements-that-require-javascript-without-javascript/ #ZenRiddle #WebDevelopment #CodingFun #ReinventingTheWheel #HackerNews #ngated
Hiding elements that require JavaScript without JavaScript
I’ve tried my best to make sure that this site works great (or at least reasonably well) even without JavaScript, but when JavaScript isn’t available, it can be a little clunky to hide things that do require it. With a mere 7 lines (or a one-liner if you’re nasty), you can easily hide elements that require JavaScript so that you don’t end up with broken functionality visible to users who have JavaScript off.