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! 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. 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! 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
Archived
This topic is now archived and is closed to further replies.