title: How to combine both scroll-snap and jQuery .scroll()?
body: <p>I'm having difficulty combining both of these in the same project.</p>
  
  <p>If I enable <code>overflow: scroll</code>, then my jQuery function doesn't get called, but if I disable it then my jQuery works but not the scroll-snap.</p>
  
  <p>I've tried changing "window" to "#scroll-parent" in the jQuery <code>.scroll()</code> but it didn't do anything.</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>$(window).scroll(function() {
    setMenuColor();
   });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    font-family: "Montserrat";
    background: #000;
    margin: 0px;
    overflow-x: hidden;
  }
  #scroll-parent {
    //overflow: scroll;
    height: 100vh;
    scroll-snap-type: mandatory;
    scroll-snap-points-y: repeat(100vh);
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>