0

Having issues getting a YouTube video to appear on my clients site. Fancybox is supposed to call up the video but instead, I get the box, but it's just a wide box with no content inside of it.

I'm using v2.1.5 of Fancybox and here's the code I'm using to call it.

The Sample is here: https://starmountaincapital.com/home-youtube/

Just click on the Play Video button.

// fancybox modal popup init
function initLightbox() {
    jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({
        helpers: {
            overlay: {
                css: {
                    background: 'rgba(0, 0, 0, 0.7)'
                }
            }
        },
        afterLoad: function(current, previous) {
            // handle custom close button in inline modal
            if(current.href.indexOf('#') === 0) {
                  jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){
                    e.preventDefault();
                    jQuery.fancybox.close();
                });
             }
         }
     });
}
Adam Bell
  • 1,049
  • 1
  • 16
  • 50
  • Found the solution. It was actually in another SO post: https://stackoverflow.com/questions/15272857/load-denied-by-x-frame-options-http-www-youtube-com-v-g5rm5strmxy-does-not-pe – Adam Bell Jun 22 '18 at 03:14
  • https://stackoverflow.com/a/27193448/1055987 – JFK Jun 22 '18 at 14:27

0 Answers0