Author: | afuggini |
---|---|
Views Total: | 1,200 views |
Official Page: | Go to website |
Last Update: | March 12, 2018 |
License: | MIT |
Preview:

Description:
A pure JavaScript plugin which makes your videos (for example Youtube & Vimeo videos) and even any elements sticky at the of the bottom of the webpage when you scroll past them.
Similar to the Tumblr‘s sticky video function.
How to use it:
Include the following JavaScript and CSS files on the web page.
<link rel="stylesheet" href="css/sticky.css"> <script src="js/sticky_video.js"></script>
Embed a Youtube video into the sticky container.
<div id="sticky-container"> <iframe class="sticky-container__object" src="https://www.youtube.com/embed/yMMz2VwbhVI?enablejsapi=1&rel=0&showinfo=0&controls=0&autoplay=1" frameborder="0" height="270" width="480" allow="autoplay; encrypted-media"></iframe> </div>
Initialize the StickyVideo library and done.
new StickyVideo('sticky-container')