Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7428965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:53:41+00:00 2026-05-29T08:53:41+00:00

I know how to display content if JavaScript is disabled, but what I want

  • 0

I know how to display content if JavaScript is disabled, but what I want to do is make a div suddenly appear even if the page is open at the time of JavaScript being disabled.

  1. The page is opened.
  2. The user goes to browser settings and disables JavaScript.
  3. A div shows without refreshing the page.

How can I do this? I’ve seen other sites do this but I looked at their JavaScript files and didn’t find anything in it.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:53:41+00:00Added an answer on May 29, 2026 at 8:53 am

    Here’s a solution using CSS animations. They’re not supported everywhere, but I can’t think of any alternative.

    This hides your message by giving it a font-size of 0, which is reset to 100% after a delay of one second. Every half-second the JavaScript restarts the animation by switching to a dummy animation which keeps the element hidden. (Demo on jsfiddle)

    HTML

    <div id="noscript-message">
        Please enable JavaScript to use this page.
    </div>
    
    <div>
        Spiffy JavaScript app here!
    </div>
    

    CSS

    #noscript-message {  
        -webkit-animation-duration: 1s;
        -webkit-animation-name: delayedDisplay;
        color: blue;
    }
    
    @-webkit-keyframes delayedDisplay {
        0% { font-size: 0;}
        99% { font-size: 0;}
        100% { font-size: 100%; }
    }
    
    @-webkit-keyframes delayedDisplay_dummy {
        0% { font-size: 0; }
        100% { font-size: 0; }
    }
    

    JavaScript

    var message = document.getElementById("noscript-message");
    
    setInterval(function() {
        message.style.webkitAnimationName = "delayedDisplay_dummy";
        setTimeout(function() {
            message.style.webkitAnimationName = "delayedDisplay";
        }, 0);
    }, 500);
    

    You would need to duplicate all of the webkit prefixed properties with the other vendor prefixes; I’ve omitted them here for clarity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a way to make an AIR app display over top
I want to know which component is best to display multiple line of text's(
I know that in Javascript document.location.href = #my_id tells the browser to display the
i want to know there a limitation in size for an iphone to display
Is there a tag in HTML that will only display its content if JavaScript
I'm trying to design a page that has two columns of content, div#left and
I'm writing a webpage and I need to display a div with some content
Does anyone know the display formatter that I would need to add to the
Does anyone know how to display a percentage format based on the locale using
I would like to know how to display orders placed on a certain day.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.