title: Select sibling of parent on hover with jQuery
body: <p>I'm trying to change the css of <code>.target</code> that is the sibling of the parent of <code>.hover</code>. Can't seem to get this code to work - I'm not sure if I need $(this) at the beginning of my function, or $('.target')... I think it might be .target because that is what I'm changing the css of with <code>.css()</code>.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('.hover').hover(
          function(){
              $(this).parent().siblings('.target').css('display', 'inline');
          },
          function(){
              $(this).parent().siblings('.target').css('display', 'none');
          }
      );
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>And here is my hunch (which also doesn't work):</p>
  
  <pre><code>$('.target').parent(this).sibling().css('display', 'inline');
  </code></pre>
  
  <p>And here is html</p>
  
  <pre><code>&lt;div class="target" style="display: none;"&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;span class="hover"&gt;Hover&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>EDIT-----------------
  It seems that it doesn't work when a <code>span</code> is <code>class="hover"</code>.</p>
  
  <p>EDIT numero dos --------------------
  It seems that I had my <code>&lt;span&gt;</code> two parents deep and needed <code>.parent().parent()</code> Thanks.</p>