Plugin jQuery: LazyYT.js : A jQuery plugin to lazy load Youtube videos

LazyYT.js : A jQuery plugin to lazy load Youtube videos
http://www.jqueryrain.com/?http://www.newmediacampaigns.com/demo/lazyyt
https://github.com/tylerpearson/lazyYT/archive/master.zip
http://www.newmediacampaigns.com/blog/lazyytjs-a-jquery-plugin-to-lazy-load-youtube-videos
19/01/2014

Nội dung

LazyYT.js: A jQuery plugin to lazy load Youtube videos

This is a jQuery plugin to lazy load Youtube videos. On the initial load, the div will be replaced by a preview img of the video. On hover, the preview img will be replaced by the iframe Youtube video.

Youtube video embeds were causing an obnoxious lag on every page load. In order to speed things up, we wrote a jQuery plugin called lazyYT.js. While we have done similar custom setups for sites we have built before, we wanted to put together something simple, easy-to-use, and available for anyone.

To speed up the page load LazyYT works by initially loading a preview image, then waiting until the video is actually clicked to load and start the full Youtube video.


Nguồn: www.jqueryrain.com/2014/01/lazyyt-js-jquery-plugin-lazy-load-youtube-videos/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận