How to avoid this repetitive keyup error/warning?
<p>I have a keyup function on a form input which executes every time a key is pushed and I get a warning in firebug that says:</p>

<pre><code>The 'charCode' property of a keyup event should not be used. The value is meaningless. 
</code></pre>

<p>I'm translating this as "the label is already hidden so your keyup event is doing nothing"</p>

<p>the thing is... I only need this keyup function to run once.</p>

<p>Quite simply the functionality is a label with a field tip ie 'Enter your email', hovering over a text input. On typing, the label disappears.</p>

<p>The problem is that my code tries to continue to hide this label every single time a key is pushed.</p>

<p>The html code I am using is:</p>

<pre><code>&lt;label for='inp_email'&gt;enter your email&lt;/label&gt;
&lt;input id="inp_email" name="inp[email]" class="inp" /&gt;
</code></pre>

<p>the jquery is </p>

<pre><code>$(document).ready(function(){

   $('.inp').keyup(function(){

      $(this).prev('label').fadeOut('fast');

   });

});
</code></pre>

<p>So I thought it needs to do a check like:</p>

<pre><code> $('.inp').keyup(function(){

    $(this).prev('label:visible').fadeOut('fast');

 });
</code></pre>

<p>(Note: ':visible' in the selector.)</p>

<p>This doesn't work.</p>

<p>And I also tried:</p>

<pre><code> $('.inp').keyup(function(){

    $(this).prev('label').is(':visible').fadeOut('fast');

 });
</code></pre>

<p>But that error'd, so I don't seem to understand that .is function very well yet.</p>

<p>Any ideas?</p>
