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

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -