title: jQuery if statement to check visibility
body: <p>I'm trying to write a script that will hidden/show div depending on other elements visibility.  The action should take place when i click on other element. Here's what I've wrote so far:</p>
  
  <pre><code>$('#column-left form').hide();
      $('.show-search').click(function() {
          $('#column-left form').stop(true, true).slideToggle(300);
          if( $('#column-left form').css('display') == 'none' ) {
              $("#offers").show();
          } else {
              $('#offers').hide();
          }
      });
  </code></pre>
  
  <p>It hides the div, but it doesn't come back when I hide the form. Will be greatful for any help :)</p>
  
  <p>edit:</p>
  
  <p>Ok, I've managed to achive the desired effect by writing this:</p>
  
  <pre><code>$('#column-left form').hide();
      $('.show-search').click(function() {
          if ($('#column-left form').is(":hidden")) {
              $('#column-left form').slideToggle(300);
              $('#offers').hide();
          } else {
              $('#column-left form').slideToggle(300);
              $("#offers").show();
          }
      });   
  </code></pre>
  
  <p>I don't know if it's written correctly but it works ;) Thanks everybody for help!</p>