title: HTML5 Javascript Play/Pause button
body: <p>I'm attempting to customise the control buttons on my video player. Currently I have a button that plays and pauses my video. This is working great. Though I want a  visual representation of the play and pause buttons, instead of them staying the same when in the paused state or when the video is playing. I plan on having two seperate images for play and pause.</p>
  
  <p>My problem is that I can't quite get my javascript to toggle my buttons, I'm thinking the best way to toggle the buttons is when one is paused, hide one element and when the video is playing hide the other element.</p>
  
  <p>So here is what I have currently:</p>
  
  <pre><code>function playPause() { 
  
  mediaPlayer = document.getElementById('media-video');
  
  if (mediaPlayer.paused) 
    mediaPlayer.play(); 
  $('.play-btn').hide();
  else 
    mediaPlayer.pause(); 
  $('.pause-btn').hide();
  
  }
  </code></pre>
  
  <p>Any help is greatly appreciated. </p>