Are there any pitfalls in displaying a "No JavaScript" warning in the following fashion?
<p>I have a webpage that has a comment box that can be toggled by clicking a link (the opening and closing of the box is controlled using JavaScript, specifically JQuery). This box is hidden by default, so naturally, it's impossible to display without the use of JavaScript. I'm not concerned by this fact: the comment box is not a "necessary" feature and this is a small personal site, so I don't mind that a tiny percentage of visitors may not experience full functionality. However, I would like to display a warning if the user does not have JavaScript enabled.</p>

<p>I've considered the idea of doing this by presenting a small message (with the use of a simple HTML <code>&lt;p&gt;</code> tag) near the link that toggles the comment box, using the following bit of code:</p>

<pre><code>&lt;p class="alert" id="nojs-warning"&gt;You must have JavaScript enabled to leave a comment.&lt;/p&gt;
</code></pre>

<p>Of course, I don't want to display this if JavaScript <em>is</em> enabled, so I have the following JQuery trigger set up to immediately hide the box when the page is loaded:</p>

<pre><code>$(function() {
    $('#nojs-warning').hide();
});
</code></pre>

<p>Thus, if the user has JavaScript enabled, the event will fire and the warning will be hidden; if the user doesn't have JavaScript enabled, the event <em>won't</em> fire, and thus the warning will still be displayed.</p>

<p>For such a small, personal site, this seems like an elegant solution. Are there any pitfalls to this approach?</p>
