Embedyt – a jquery plugin for embedding youtube video with lazy loading approach.
How Jquery plugin – embedyt works
- It only loads one video image from youtube and renders a play button on it.
- Once user clicks on the play button, video is loaded.
- For fancier button, you can change the javascript code accordingly.
Sample usage
jQuery(function () { jQuery("div.youtubeembed").each(function (index) { jQuery(this).embedyt(jQuery(this).attr('youid')); }); });
Source code
Github link: https://github.com/pkjain/embedyt
License
GPL