title: How to hide label on input-focus with JQuery?
body: <p>I am trying to hide the label when I click inside an input field, but it just doesn't work and I cant figure out why on my own.</p>
  
  <p>I tried to modify this example to suit my needs without any luck.: <a href="http://blog.stannard.net.au/2011/01/07/creating-a-form-with-labels-inside-text-fields-using-jquery/" rel="nofollow">http://blog.stannard.net.au/2011/01/07/creating-a-form-with-labels-inside-text-fields-using-jquery/</a> </p>
  
  <p>Please be as simple as possible, no nifty tricks needed here.</p>
  
  <p>My code:
  html:</p>
  
  <pre><code>fieldset id="fieldset1"&gt;
      &lt;dl&gt;
          &lt;dt class="jform_name"&gt;
              &lt;label id="jform_name-lbl" class=" required" for="jform_name"&gt;Wer sind Sie:&lt;/label&gt;
          &lt;/dt&gt;
          &lt;dd class="jform_name"&gt;
              &lt;input id="jform_name" class="required" type="text" aria-required="true" required="required" size="37" value="" name="jform[name]"&gt;
          &lt;/dd&gt;
      &lt;/dl&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>Here is the jQuery:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $('input#jform_name').focus(function(){
      $('label#jform_name-lbl').hide();
  });
  &lt;/script&gt;
  </code></pre>