0

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

2
  • 1
    try 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. Commented Mar 4, 2015 at 0:30
  • Thank you for your idea! I was able to load the div in jquery for the Javascript version. Commented Mar 4, 2015 at 1:07

1 Answer 1

3

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.