javascript - How open youtube video manually with fancybox -
i building angularjs webapp , want open youtube video calling method of constructor. achieve that; want reproduce same behavior as
   $(document).ready(function() {         $('.fancybox-media')             .attr('rel', 'media-gallery')             .fancybox({                 openeffect : 'fade',                 closeeffect : 'fade',                 padding: 0,                 helpers : {                     media : {},                     buttons : {}                 }             });     });   but using manual  way, $.fancybox.open([ ... ]). can guide me on how it?
$.fancybox.open({     content: '<iframe width="xxx" height="xxx" src="//www.youtube.com/embed/xxxxxxxx" frameborder="0" allowfullscreen></iframe>' });      
Comments
Post a Comment