I have developed a webpage that requires very little javascript. Although I still need to make the site work for all users. So first I ask, is there a way to hid a single div when javascript is disabled. If this is not possible how would I go about loading a different version of the page that doesn't have the div in it
-
1try hiding the div by default then write a line of javascript to unhide the div. If they viewer doesn't have javascript enabled it'll be hidden.Jason White– Jason White2015-03-04 00:30:20 +00:00Commented Mar 4, 2015 at 0:30
-
Thank you for your idea! I was able to load the div in jquery for the Javascript version.Jake– Jake2015-03-04 01:07:40 +00:00Commented Mar 4, 2015 at 1:07
Add a comment
|
1 Answer
Use the noscript tag http://www.w3schools.com/tags/tag_noscript.asp
<script>
document.write("Hello World!")
</script>
<noscript>Your browser does not support JavaScript!</noscript>