Youtube Video Open In Bootstrap 3 Modal With – YTModal

YouTube
Demo    Download
Youtube Video Modal with jQuery and Bootstrap 3 - YTModal
File Size: 64.16 KB
Views Total: 181 views
Last Update:November 21, 2020
Publish Date: September 29, 2020
Official Website: Go to website
License: MIT

YouTube Modal/popup a light weight plugin in jQuery with fully customize with bootstrap. Also required with YouTubeDefaultImageLoader.js with add in to YouTube video iframes with post thumbnail image into your web page on popup. If you need youtube video open with popup or modal box, you can load them with this method, which first loads only the default thumbnail image for each youtube video and then load the youtube video with bootstrap popup/modal using the iframe_api provided by YouTube.

How to use it:

1. Include Bootstrap 3 framework and jQuery JavaScript library loaded:

<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="/jquery-1.11.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>

2. Load the jQuery YouTubeDefaultImageLoader.js

<link rel="stylesheet" href="css/YouTubeDefaultImageLoader.css">
<script src="js/YouTubeDefaultImageLoader.js"></script>

3. Embed an Youtube video into your document as follow.You can use the DIV’s IDattribute to specify the ID of Youtube video you want to embed.

<div id="y73mJZdMEcw"
  class="youtubeVideoLoader">
</div>

Done


Mady

Mady Schaferhoff is an expert jQuery script at jQuerypost. He offers web development services to clients globally. He also loves sharing Html,CSS, jQuery knowledge through blog posts like this one.

Related jQuery Plugins