title: Jquery: How do I set a hidden element to display when another element is in focus?
body: <p>I'm trying to display contextual help alongside form fields, that is only visible when those fields are in focus or hovered over. I've tried using mere CSS, but the results seem very fragile and inconsistent.</p>
  
  <p>Here is my CSS:</p>
  
  <pre><code>form .instruct {
      position: absolute;
      right: -220px;
      top: 10px;
      visibility: hidden;
      width: 200px;
      z-index: 1000;
  }
  form li:focus .instruct, form li:hover .instruct {
      visibility: visible;
  }
  </code></pre>
  
  <p>In my markup, I've given my form some structure using an ordered list, grouping each field with it's instructions in a <code>li</code> element:</p>
  
  <pre><code>&lt;form&gt;
      &lt;ol&gt;
          [...]
          &lt;li&gt;
                  &lt;label for="message"&gt;Message&lt;/label&gt;
                  &lt;textarea id="message" name="message"&gt;&lt;/textarea&gt;
                  &lt;div class="instruct"&gt;
                      &lt;p&gt;Instructional text and &lt;a href="#"&gt;Formating help.&lt;/a&gt;&lt;/p&gt;
                  &lt;/div&gt;
          &lt;/li&gt;
          [...]
  </code></pre>
  
  <p>The instructions appear when hovering over the field, but not when the field is in focus-- and if the mouse moves to select a link in the contextual instructions, they disappear.</p>
  
  <p>Each field has it's own instructions, and I need each one to appear when the appropriate field is in focus or hover state.</p>
  
  <p>I thought this might be a case where jquery could make life easier. Is there a quick way to accomplish this? If there's a <em>reliable</em> way to do this using raw CSS, I'd be happy with that too.</p>
  
  <p>Thanks!</p>