title: jQuery closest(); not working
body: <p>I am trying to do make some text show when a text input is on focus, but the closest(); method doesn't seem to be working.</p>
  
  <p>I have done a <a href="http://jsfiddle.net/U6Fwp/2/">JS Fiddle</a> for you to look at.</p>
  
  <p>and here is the code also.</p>
  
  <p>JS </p>
  
  <pre><code>$(document).ready(function(){
    $('.validation-error').hide();
    $('.name-input').on("focus", function(){
     $(this).closest('.validation-error').show();
    });
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;fieldset&gt;
   &lt;legend&gt;User Details&lt;/legend&gt;
    &lt;table&gt;
     &lt;tr&gt;
      &lt;td width="200"&gt;
       &lt;label for="user"&gt;&lt;span class="required-fields"&gt;*&lt;/span&gt; User     Name&lt;/label&gt;
      &lt;/td&gt;
    &lt;td&gt;
      &lt;input type="text" id="user" class="name-input"&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p class="validation-error"&gt;This field cannot be blank or less than 2 characters.&lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     &lt;label for="job_title"&gt;&lt;span class="required-fields"&gt;*&lt;/span&gt; Job Title&lt;/label&gt;&lt;/td&gt;
     &lt;td&gt;
      &lt;input type="text" id="job_title" class="name-input"&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p class="validation-error"&gt;This field cannot be blank or less than 2 characters.&lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     &lt;label for="full_name"&gt;* Full Name&lt;/label&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input type="text" id="full_name" class="name-input"&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p class="validation-error"&gt;This field cannot be blank or less than 2 characters.&lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>Any help would be appreciated.</p>