Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Triggering FancyBox with click() event #10125
    blankzgood
    Participant

    Specifying the type as iframe seems to make it work.

    $( document ).ready(function() {
       $( ".youtube_box" ).click(function() {
          var YouTubeID = this.id;
    
          $.fancybox({
              href : 'https://www.youtube.com/embed/' + YouTubeID + '?autoplay=1'
          }, {
              type: 'iframe'
          });
       });
    }); 
    

    See this Fiddle.

Viewing 1 post (of 1 total)