title: Stop Playing Youtube Video When Lightbox Is Closed
body: <p>I'm creating a lightbox to play videos from youtube without a plugin, so far things are going well, but now I'm having a issue, I don't know how to make the youtube video stop playing when the Lightbox is closed, here's the code</p>
  
  <pre><code>//triggering or close the lightbox
  $( '#overlay, #close').on('click', function(event) {
      $("#lightbox, #overlay").hide();
  });
  
  $( '#show').on('click', function(event) {
      $("#lightbox, #overlay").show();
  });
  
  
  // This loads the iframe only on click on the Lightbox Button
  var iframes = $('iframe');
  
  $('.show').click(function() {
      iframes.attr('src', function() {
          return $(this).data('src');
      });
  });
  
  iframes.each(function() {
      var src = $(this).attr('src');
      $(this).data('src', src).attr('src', '');
  });
  </code></pre>
  
  <p>Also I don't know how to make play only the vídeo from the button I clicked, because right now when I click on a <code>Show lightbox</code> button it's playing all the vídeos from the page and not just the current one from the button I clicked.</p>
  
  <p>Here's the <strong><a href="http://jsfiddle.net/1w22b76x/1/" rel="nofollow">Jsfiddle exemple</a></strong>. HTML is included on it</p>