title: pause html5 video when scrolling starts
body: <p>I recently added a html5 video to my own company website. imbeeld.nl</p>
  
  <p>Now I want the video to pause when ones starts scrolling the page.</p>
  
  <p>I know this can be done by adding some JS, but I'm quite new to this.</p>
  
  <pre><code>document.getElementById('myvideotag').pause();
  </code></pre>
  
  <p>I allready made some script for replacing the video's CSS class when scrolling begins:</p>
  
  <pre><code>$(document).on("scroll",function(){
    if($(document).scrollLeft()&gt;1)    
      {$("#frontvideo").removeClass("front_cover").addClass("front_cover_hide");}
    else{$("#frontvideo").removeClass("front_cover_hide").addClass("front_cover");}
  }); 
  </code></pre>
  
  <p>How to combine both JS parts and pause the video when scrolling begins?</p>
  
  <p>Thanks!</p>