JQuery Check if input is empty and show status of it
<p>I have an input which I need to check whether it is empty or not:</p>

<pre><code>&lt;input id="myinput" name="myinput" type="text" value="hello" /&gt;
</code></pre>

<p>The input above could change any time, so I need to check it on <code>onchange</code>?</p>

<p>If my input is not empty then I need to add the class <code>ok</code> or else add class <code>noTxt</code>.</p>

<p>The class could be added to the element below.</p>

<pre><code>&lt;div id="status" style="display:none;"&gt;&amp;nbsp;&lt;/div&gt;
</code></pre>
