title: Audio breakpoints on scroll
body: <p>I'm developing a one page website with Skrollr.js plugin. I need to add multiple audio tracks to specific pixel heights and stop these tracks in multiple breakpoints. How can I do that?</p>
  
  <p>I tried with the script below, but I don't know how to add multiple conditions with other breakpoints, tracks, and pixel height.</p>
  
  <pre><code>var playing = false;
  var audioTrack = $('#track1').get(0);
  
  window.onscroll = function() {
    var winH = $(window).height();
    var scrollPage = $(window).scrollTop();
  
    if(!playing &amp;&amp; winH &gt;= 768 &amp;&amp; scrollPage &gt; 1000 &amp;&amp; scrollPage &lt; 3000){
      audioTrack.play();
      playing = true;
    }else if(scrollPage &gt; 3000 || scrollPage &lt; 1000 || winH &lt; 768 ){
      audioTrack.pause();
      audioTrack.currentTime = 0;
      playing = false;
    }
  }
  </code></pre>