title: javascript hide div 1 if div 2 is visible?
body: <p>i am trying to create a piece of javascript, i am wanting to create a function that says if one div is visible prevent another one from opening or if div 1 is visible hide div 2 on page load.</p>
  
  <p>Can someone show me how i can do this. Thanks.</p>
  
  <pre><code>&lt;script&gt;
  
        window.onload (function () {
          if  ($('.welcome_overlay').is(":visible")) {
              $("#cover").hide();
  
  
                      }
      });
  &lt;/script&gt;
  </code></pre>