Message displayed instantly

When the user has JS disabled a message is displayed.
This message is contained in an HTML element where css display none rule is applied when the JS file loads(which means of course that JS is enabled).

And here is my problem.
when the page loads and in the case where JS is enabled the message appears instantly.(it appears and disappears very quickly).
I cannot understand why this happens.
I tried placing the JS file at the top of the page(previously it was in the bottom) but that did not improve a thing.
Any ideas…

why not using the <noscript> element?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.