msaz87 Posted December 10, 2009 Share Posted December 10, 2009 Hey all, Just a quick question... I was wondering how to hide an element if JS is disabled -- so basically the inverse of the <noscript> tags. Is this possible? I have a <div> that opens as the page is loading and closes via a JS function, but obviously I want this hidden if the user's JS is turned off. Any ideas or help is greatly appreciated -- thanks! Quote Link to comment https://forums.phpfreaks.com/topic/184632-hiding-element-if-js-is-off/ Share on other sites More sharing options...
KevinM1 Posted December 10, 2009 Share Posted December 10, 2009 Hey all, Just a quick question... I was wondering how to hide an element if JS is disabled -- so basically the inverse of the <noscript> tags. Is this possible? I have a <div> that opens as the page is loading and closes via a JS function, but obviously I want this hidden if the user's JS is turned off. Any ideas or help is greatly appreciated -- thanks! Just set its display to 'none' in your CSS. If JavaScript is enabled, you can change it to 'block' on page load. Quote Link to comment https://forums.phpfreaks.com/topic/184632-hiding-element-if-js-is-off/#findComment-974701 Share on other sites More sharing options...
msaz87 Posted December 10, 2009 Author Share Posted December 10, 2009 Perfect -- thanks very much! Quote Link to comment https://forums.phpfreaks.com/topic/184632-hiding-element-if-js-is-off/#findComment-975061 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.