Clearing a text input (if it's empty) when another text box is clicked - jQuery
<p>I have an email text box that contains the text '(Not Required)' until a user clicks on it, at which point it turns blank. I'm trying to make it to where if the user clicks another text box without entering an email address (or entering anything), the text box will revert to containing (Not Required).</p>

<p>Here's what I have:</p>

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

   $('#email').val("(Not Required)");

   // this part works fine
   $('#email').click(function(){
       if ($(this).val() == '(Not Required)'){
           $(this).val('');
       }
   });

   // this isn't working
   $(':text').click(function(){
       var em = $('#email').val().length();
       if (em&lt;3){
           $('#email').val('(Not Required)');
       }
   });

});
</code></pre>

<p>I can't figure out why the second part isn't working correctly. Any help would be rewarded with a lifetime's devotion to yourself from myself in a very big way. Forever. </p>
