Skip to main content
Pensando en utilizar botones con vídeos dinámicos:
Origen Enlace

Sería mejor:

btn.onclick = function() {
    var src = jQuery(this).attr('data-video');
    jQuery(".embed-container").html('<iframe src="https://player.vimeo.com/video/158196905?title=0&byline=0&portrait=0"src="'+src+'" width="640" height="340" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="top:-350px;"></iframe>');
    modal.style.display = "block";
    jQuery('header').css('display','none');
 }
span.onclick = function() {
      jQuery(".embed-container").find('iframe').remove();
      modal.style.display = "none";
      jQuery('header').css('display','block');
}

Sería mejor:

btn.onclick = function() {
    jQuery(".embed-container").html('<iframe src="https://player.vimeo.com/video/158196905?title=0&byline=0&portrait=0" width="640" height="340" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="top:-350px;"></iframe>');
    modal.style.display = "block";
    jQuery('header').css('display','none');
 }
span.onclick = function() {
      jQuery(".embed-container").find('iframe').remove();
      modal.style.display = "none";
      jQuery('header').css('display','block');
}

Sería mejor:

btn.onclick = function() {
    var src = jQuery(this).attr('data-video');
    jQuery(".embed-container").html('<iframe src="'+src+'" width="640" height="340" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="top:-350px;"></iframe>');
    modal.style.display = "block";
    jQuery('header').css('display','none');
 }
span.onclick = function() {
      jQuery(".embed-container").find('iframe').remove();
      modal.style.display = "none";
      jQuery('header').css('display','block');
}

Origen Enlace

Sería mejor:

btn.onclick = function() {
    jQuery(".embed-container").html('<iframe src="https://player.vimeo.com/video/158196905?title=0&byline=0&portrait=0" width="640" height="340" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="top:-350px;"></iframe>');
    modal.style.display = "block";
    jQuery('header').css('display','none');
 }
span.onclick = function() {
      jQuery(".embed-container").find('iframe').remove();
      modal.style.display = "none";
      jQuery('header').css('display','block');
}