title: mute unmute sound with jQuery on scroll
body: <p>I want to mute an audio on scrolling and unmute when the scroll is on the top of the page. I have tried many options here but nothing works.</p>
  
  <p><a href="http://codepen.io/chrisgaillard/pen/JbWxWJ" rel="nofollow noreferrer">http://codepen.io/chrisgaillard/pen/JbWxWJ</a></p>
  
  <pre><code>$(window).scroll(function() {
      if ($(this).scrollTop() &gt;1){  
          $('audio').setAttribute('muted'); 
      } else {
          $('audio').setAttribute('unmuted'); 
      }
  });
  </code></pre>
  
  <p>Thank you</p>