title: jQuery UI - a swap function that hides and unhides elements by selector
body: <p>Preface: I have jQuery and jQuery UI included on a page.</p>
  
  <p>I have this function defined:</p>
  
  <pre><code>    function swap(sel) {
          if (1 == 1) {
             $(sel).hide('drop',{direction:'left'});
          }
      }
  </code></pre>
  
  <p>How do I fix the (1 == 1) part to test to see if the element is already hidden and then bring it back if it is. I'm sure this is easy, but I'm new to jQuery.</p>