title: jQuery conditional header class swap
body: <p>Hope someone can help me out since I don't really know js and would like to build upon an existing function on a WP site...</p>
  
  <p>I have two versions of a site header. On the homepage the alt (transparent background) version loads, and after scrolling, it swaps to the sitewide non-alt (white bg) version. </p>
  
  <p>I would like to add a condition where the header also swaps to the non-alt version when the the menu button is "toggled" (class="main-navigation toggled").</p>
  
  <p>Here's the existing function. Thanks is advance.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery(document).ready(function ($) {
      console.log('ready');
        var header = $(".site-header");
        if( $("body.home").length ) {
          header.addClass("site-header-alt");
        }
          
        $(window).scroll(function() {    
            var scroll = $(window).scrollTop();
            
            if( $("body.home").length ) {
              if (scroll &lt;= 100) {
                  header.addClass("site-header-alt");
              } else {
                  header.removeClass("site-header-alt");
              }
            }
        });
    });</code></pre>
  </div>
  </div>
  </p>