title: Javascript, jQuery play pause button with href html5 video
body: <p>I am trying to make a href to pause play the HTML 5 video with javascript but i has not yet succeded this is my html: </p>
  
  <pre><code>&lt;a href="" class="play-pause"&gt;play-pause&lt;/a&gt; 
  
  &lt;video poster="bg.jpg" loop id="bg-vid"&gt;&lt;/video&gt;
  </code></pre>
  
  <p>and this is my javascript (I have no to very little experience with javascript so this was my guess on how it would look but it did not work)</p>
  
  <pre><code>$(".play-pause").click, '#bg-vid'(function(e){
      var video = $(this).get(0);
      if (video.paused === false) {
          video.pause();
      } else {
          video.play();
      }
  
      return false;
  });
  </code></pre>