mediabox

1.1.3 • Public • Published

MediaBox

Responsive Lightbox Plugin for Youtube and Vimeo with Vanilla JS

Demo

View demo here

Install

With npm

npm install mediabox --save

Download

You can download the latest version or checkout all the releases here.

How to use?

Require the package or use the global mediabox namespace and include style:

commonJS

var mediabox = require('mediabox');

ES6

import mediabox from 'mediabox';

Browser

<link rel="stylesheet" type="text/css" href="path/to/mediabox.css">
<script src="path/to/mediabox.js"></script>
<script>
    MediaBox('.mediabox');
    MediaBox('.mediabox', { rel: '0' }); // Additional options
</script>

Now add class to links, for example:

<a href="https://www.youtube.com/watch?v=3qyhgV0Zew0" class="mediabox">Youtube</a>
<a href="https://vimeo.com/71495477" class="mediabox">Vimeo</a>

Browser Support

IE Chrome Firefox Opera Safari
IE 10+ Latest Latest Latest Latest

Thanks

Many thanks to Qassim Alobaidi, who originally created the plugin for jQuery.

Contributing

Check CONTRIBUTING.md for more information.

History

Check Releases for detailed changelog.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i mediabox

Weekly Downloads

100

Version

1.1.3

License

MIT

Unpacked Size

32.8 kB

Total Files

12

Last publish

Collaborators

  • pinceladasdaweb