title: Switch logo using jQuery
body: <p>I am using Divi WordPress theme which adds the class <code>.et-fixed-header</code> to <code>#main-header</code> while scrolling down. In the header there is the logo which I wish to change when there is the class <code>.et-fixed-header</code>. </p>
  
  <p>Here is my jQuery:</p>
  
  <pre><code>$(document).scroll(function () {
      if ($('#main-header').hasClass( 'et-fixed-header' )) {
           $('#logo').attr('src', 'new-img.png');
      }
  
  
  });
  </code></pre>
  
  <p>My question is, how to get this to <strong>default logo</strong> when there is no <code>.et-fixed-header</code> in the <code>#main-header</code>. My code is replacing the logo when I scroll down but it does not go to the default logo when I scroll up or in other words, when there is no such class <code>.et-fixed-header</code> in the <code>#main-header</code>. I understand I need to place an <code>else</code> statement but not sure of the code. Any help will be appreciative. </p>
  
  <p><strong>Edit</strong></p>
  
  <p>The logo is uploaded via theme options and not placing manually by the users</p>