Posted By

vijayrajesh on 01/15/13


jquery YouTube autoplay onclickpreventdefault

Versions (?)

Dynamically Load Youtube Video Iframe embed Code inside a DIV

 / Published in: jQuery


By storing or by having the Iframe embed code as a variable, You can play the Youtube video on a click of a button or any other event. I have used “append” function of jQuery to append the IFrame code dynamically inside a DIV tag.

Report this snippet  

You need to login to post a comment.