title: Using JQuery Waypoints to play a video when it is scrolled to
body: <p>I'm trying to play an HTML5 video when the user scrolls to it using the waypoints plugin for jQuery. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>$(document).ready(function() { videoSetup(); });
  function videoSetup() {
  
      var video = $("#video");
  
      video.waypoint(function(direction) {
          video.get(0).play();
      });   
  
  }
  </code></pre>
  
  <p>Put when the video is scrolled to nothing happens. </p>