Displaying iframe with javascript/jquery -


i have iframe:

<iframe width="0" height="0" src="http://www.youtube.com/embed/nc9xq-tvyhi?autoplay=1&start=110&end=119" frameborder="0" ></iframe></body></html>'; 

i need display/execute iframe on javascript/jquery event. question how can display iframe javascript/jquery code?

thanks in advance!

you need learn youtube api .. answer here ..

as see below demo link

var player;   function onyoutubeiframeapiready() {     player = new yt.player('player', {       height: '390',       width: '640',       videoid: 'u1zgflcw8aw',       events: {         'onready': onplayerready,         'onstatechange': onplayerstatechange       }     });   }    // 4. api call function when video player ready.   function onplayerready(event) {     event.target.playvideo();   } 

http://jsfiddle.net/rushijogle/tdnm5/1/


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -