PATH:
home
/
letacommog
/
crmleta
/
libraries
/
jquery
/
lazyYT
/*! * lazyyt * v0.3.1 - 2014-03-07 * Copyright (c) 2014 Tyler Pearson <ty.pearson@gmail.com> (http://tylerp.me); Licensed MIT %> */!function(a){"use strict";function b(b){var c=b,d=c.data("width"),e=c.data("height"),f=c.data("youtube-id"),g=c.data("parameters")||"";if("undefined"==typeof d||"undefined"==typeof e||"undefined"==typeof f)throw new Error("lazyYT is missing a required data attribute.");c.css({position:"relative",height:e,width:d,background:"url(https://img.youtube.com/vi/"+f+"/maxresdefault.jpg) center center no-repeat",cursor:"pointer","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover"}).html('<p id="lazyYT-title-'+f+'" class="lazyYT-title"></p><div class="lazyYT-button"></div>').addClass("lazyYT-image-loaded"),a.getJSON("https://gdata.youtube.com/feeds/api/videos/"+f+"?v=2&alt=json",function(b){a("#lazyYT-title-"+f).text(b.entry.title.$t)}),c.on("click",function(a){a.preventDefault(),!c.hasClass("lazyYT-video-loaded")&&c.hasClass("lazyYT-image-loaded")&&c.html('<iframe width="'+d+'" height="'+e+'" src="//www.youtube.com/embed/'+f+"?autoplay=1&"+g+'" frameborder="0" allowfullscreen></iframe>').removeClass("lazyYT-image-loaded").addClass("lazyYT-video-loaded")})}a.fn.lazyYT=function(){return this.each(function(){var c=a(this).css("cursor","pointer");b(c)})}}(jQuery);
[+]
..
[-] lazyYT.min.js
[edit]
[-] LICENSE
[edit]
[-] package.json
[edit]
[-] lazyYT.jquery.json
[edit]
[+]
demo
[-] README.md
[edit]
[-] lazyYT.min.css
[edit]
[-] .gitignore
[edit]
[-] lazyYT.js
[edit]
[-] lazyYT.css
[edit]
[-] Gruntfile.js
[edit]