Easy Youtube & Vimeo Video Embeds With jQuery - VideoBox

Easy Youtube & Vimeo Video Embeds With jQuery - VideoBox
File Size: 5.65 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

VideoBox is a lightweight jQuery plugin that makes it easier to embed Youtube or Vimeo videos with custom player parameters into the webpage.

How to use it:

1. To get started, you need to load the jQuery VideoBox plugin after jQuery.

<script src="//code.jquery.com/jquery-3.1.0.slim.min.js"></script>
<script src="videobox.js"></script>

2. Create a div placeholder for the video and use data-youtube or data-viemo to specify the video url you want to embed.

<h2>Youtube Video</h2>
<div class="demo" data-youtube="https://www.youtube.com/watch?v=c-5WsFKlKDk"></div>
<h2>Vimeo Video</h2>
<div class="demo" data-vimeo="https://vimeo.com/124077529"></div>

3. Just call the function on the DIV container and done.


4. Default parameters to the Youtube video player.

  width: '640'
  height: '360'
  loop: false
  autoplay: false
  byline: true
  color: "00adef"
  maxheight: ''
  maxwidth: ''
  portrait: true
  title: ''

Change log:


  • Update multiple videos

This awesome jQuery plugin is developed by tedktedk. For more Advanced Usages, please check the demo page or visit the official website.