Dynamically Load YouTube Video Using jQuery

load_external

This Tutorials helps you to add dynamically youtube video in iframe.  To add dynamically load the YouTube Video, you’ve to change the iframe src attribute using the jQuery. Following is the demo and download the source.

Demo | Download

Code

Create a file called index.html (or your own project).

HTML

Now, create a file called script.js and paste the following code.

Javascript

DemoDownload

 

">

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">