PluginProbe
Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades / 11.5
Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades v11.5
trunk 1.0 1.1 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 11.0 11.0.1 11.1 11.2 11.3 11.3.1 11.4 11.5 11.6 11.7 11.7.1 11.8 All 143 releases
youtube-embed-plus / scripts / embdyn.js

embdyn.js in Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades 11.5, at scripts/embdyn.js

18 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);
2
3 (function($){
4 $(document).ready(function () {
5 $('iframe[data-ep-src]').one('inview', function(event, isInView, visiblePartX, visiblePartY) {
6 if (isInView) {
7 var $vid = $(this);
8 $vid.attr('src', $vid.attr('data-ep-src'));
9 $vid.removeAttr('data-ep-src');
10 _EPADashboard_.setupevents(this.id);
11 setTimeout(function(){
12 $vid.addClass('animated ' + $vid.attr('data-ep-a'));
13 }, 1);
14 }
15 });
16 });
17 })(window.jQuery || window.Zepto || window.$);
18