JQuery Condition If Else bug in else
<p>I am trying to hide a next button <code>div</code> until the input in it is populated so I've added this code:</p>

<pre><code>&lt;script&gt;
    $(document).ready(function () {
        if ($('#myDiv').val().length == 0) {
            $('#next_btn').hide();  
        } else {    
            $('#next_btn').show();      
        }
    });
&lt;/script&gt;
</code></pre>

<p>Here is myDiv</p>

<pre><code>&lt;textarea id="myDiv"&gt;&lt;/textarea&gt;
</code></pre>

<p>If hiding the next button <code>div</code> but when I populate the input in <code>#myDiv</code> the <code>#next_btn</code> is not showing up.</p>

<p>Am I doing something wrong here?</p>
