title: Hide/show in JavaScript - stop playing YouTube iframe video
body: <p>I've used the iframe function to embed videos, and I'm hiding/showing the content and videos through JavaScript.</p>
  
  <p>I have <strong><em>one</em></strong> problem. When I press play on the first video, and then click on the next without stopping the first one, the first one just keeps on playing.</p>
  
  <p>What can I do to stop the video in the "background", when showing new content?</p>
  
  <pre><code>$(function(){
      $("#link1").click(show1);
  });
  
  function show1(){
      $("#pic1").fadeIn();
      $("#pic2").hide();
  }
  </code></pre>
  
  <p>I'm just using this simple JavaScript function, where the "pic1" and "pic2" id is the id of the div, the video are embedded in.</p>
  
  <p>I just can't seem to make it work. I tried to put remove, but then you can't see the video again if you want to.</p>