lightgallery
Advanced tools
Comparing version 1.1.5 to 1.1.6
{ | ||
"name": "lightgallery", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"homepage": "http://sachinchoolur.github.io/lightGallery/", | ||
@@ -5,0 +5,0 @@ "authors": [ |
/** ========================================================== | ||
* jquery lightGallery.js v1.1.5 // 3/29/2015 | ||
* jquery lightGallery.js v1.1.6 08/25/2015 | ||
* http://sachinchoolur.github.io/lightGallery/ | ||
@@ -439,11 +439,13 @@ * Released under the MIT License - http://opensource.org/licenses/mit-license.html ---- FREE ---- | ||
$thumb_cont = $gallery.find('.thumb-cont'); | ||
$prev.after('<a class="cl-thumb"></a>'); | ||
$prev.parent().addClass('has-thumb'); | ||
$gallery.find('.cl-thumb').bind('click touchend', function () { | ||
$gallery.addClass('open'); | ||
if ($this.doCss() && settings.mode === 'slide') { | ||
$slide.eq(index).prevAll().removeClass('next-slide').addClass('prev-slide'); | ||
$slide.eq(index).nextAll().removeClass('prev-slide').addClass('next-slide'); | ||
} | ||
}); | ||
if ($prev) { | ||
$prev.after('<a class="cl-thumb"></a>'); | ||
$prev.parent().addClass('has-thumb'); | ||
$gallery.find('.cl-thumb').bind('click touchend', function () { | ||
$gallery.addClass('open'); | ||
if ($this.doCss() && settings.mode === 'slide') { | ||
$slide.eq(index).prevAll().removeClass('next-slide').addClass('prev-slide'); | ||
$slide.eq(index).nextAll().removeClass('prev-slide').addClass('next-slide'); | ||
} | ||
}); | ||
} | ||
$gallery.find('.thumb-cont .close').bind('click touchend', function () { | ||
@@ -450,0 +452,0 @@ $gallery.removeClass('open'); |
@@ -1,2 +0,2 @@ | ||
/* v1.1.5 3/29/2015 http://sachinchoolur.github.io/lightGallery*/ | ||
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('!3(e){"2r 4I";e.4E.L=3(t){6 i,a,n,l,s,o,d,r,c,u,h,m={1k:"7",3z:!0,2m:"4y",25:"4u",K:4o,8:"",2I:!0,1Q:!1,1O:!1,2P:4f,3e:!0,2u:!0,3n:!1,18:1,3s:!0,1J:M,1b:!1,3t:{3v:"41 3S"},11:!1,1R:!1,1h:!0,1i:!1,X:!0,3y:"3C",1g:1D,1B:5,2D:!1,3M:3P,3I:3G,2c:!0,3F:!0,3E:"3Q",2z:!1,1z:!0,2x:"4b",14:!1,Y:[],3i:3(){},3b:3(){},3a:3(){},36:3(){},35:3(){},34:3(){},2W:3(){}},f=e(4),v=4,p=M,b=0,g=!1,C=!1,y=2U 0!==2T.4g||"4j"2q 1d||"4k"2q 1d||2J.4l,w=!1,T=!1,x=!1,q=e.4n(!0,{},m,t),S={1w:3(){f.2l(3(){6 t=e(4);q.14?(p=q.Y,b=0,d=b,k.1w(b)):(p=M!==q.1J?e(q.1J):t.3m(),p.13("10",3(i){p=M!==q.1J?e(q.1J):t.3m(),i.1C(),i.1Y(),b=p.1b(4),d=b,k.1w(b)}))})}},k={1w:3(){g=!0,4.3h(),4.31(),4.2H(),4.2G(),4.11(),4.2F(),4.3A(),4.3r(),q.1b?(4.7(q.1b),4.X(q.1b)):(4.7(b),4.X(b)),q.3F&&4.2h(),q.2c&&4.2c(),W(3(){i.8("4N")},3G)},3h:3(){e("1n").17(\'<j R="B-2g" E="\'+q.8+\'"><j R="B-1f"><j R="B-2A"></j><a R="B-1K" E="1K"></a></j></j>\').8("1I-1f"),a=e("#B-2g"),i=e("#B-1f"),q.3s===!0&&i.8("4G-3o-2i"),n=i.D("#B-2A");6 t="";I(q.14)1F(6 s=0;s<q.Y.A;s++)t+=\'<j E="B-7"></j>\';22 p.2l(3(){t+=\'<j E="B-7"></j>\'});n.17(t),l=i.D(".B-7")},2H:3(){q.2I&&e("#B-2g").13("10",3(t){e(t.4F).4B(".B-7")&&v.21(!1)}),e("#B-1K").Q("10 1j",3(){v.21(!1)})},31:3(){6 t=3(){u=e(1d).19()};e(1d).Q("2k.L",t())},H:3(){6 e=3(){1F(6 e=["23","4A","4z","4x","4t","4q"],t=2T.4p,i=0;i<e.A;i++)I(e[i]2q t.2n)1t!0};1t q.3z&&e()?!0:!1},2c:3(){6 t=4;I(y){6 i={},a={};e("1n").13("2p.L",3(e){a=e.2b.2a[0],i.1s=e.2b.2a[0].1s,i.2L=e.2b.2a[0].2L}),e("1n").13("2M.L",3(e){6 t=e.2b;a=t.2a[0],e.1C()}),e("1n").13("1j.L",3(){6 e=a.1s-i.1s,n=q.3I;e>=n?(t.1G(),U(h)):-n>=e&&(t.1A(),U(h))})}},2h:3(){6 t,i,a=4;e(".1I-1f").Q("2Q",3(e){e.1Y(),e.1C(),t=e.1s}),e(".1I-1f").Q("2R",3(e){e.1Y(),e.1C(),i=e.1s,i-t>20?a.1G():t-i>20&&a.1A()})},2S:3(e,t){6 i=e.1E(/\\/\\/(?:1L\\.)?2V(?:\\.1X|1X\\.1p)\\/(?:2X\\?v=|2f\\/)?([a-2Z-30\\-]+)/i),a=e.1E(/\\/\\/(?:1L\\.)?2s.1p\\/([0-32-z\\-33]+)/i),n=!1;1t q.14?"2d"==q.Y[t].1a&&(n=!0):"2d"==p.9(t).12("1M-1a")&&(n=!0),i||a||n?!0:2U 0},3c:3(t,i){6 a=t.1E(/\\/\\/(?:1L\\.)?2V(?:\\.1X|1X\\.1p)\\/(?:2X\\?v=|2f\\/)?([a-2Z-30\\-]+)/i),n=t.1E(/\\/\\/(?:1L\\.)?2s.1p\\/([0-32-z\\-33]+)/i),l="",s="";I(a){I(s=q.1z===!0&&C===!1?"?3d=1&4d=0&3f=3g":"?3f=3g",q.2z){6 o=e.4c(q.2z);s=s+"&"+o}l=\'<1a E="Z" 19="3j" 3k="3l" V="//1L.4a.1p/2f/\'+a[1]+s+\'" 2v="0" 3p></1a>\'}22 n?(s=q.1z===!0&&C===!1?"3d=1&2w;":"",l=\'<1a E="Z" R="1m\'+i+\'" 19="3j" 3k="3l" V="49://48.2s.1p/1m/\'+n[1]+"?"+s+"47=0&2w;44=0&2w;43="+q.3E+\'" 2v="0" 42 3U 3R></1a>\'):l=\'<1a E="Z" 2v="0" V="\'+t+\'" 3p="2d"></1a>\';1t\'<j E="1m-1r" 2n="3q-19:\'+q.2x+\' !3B;"><j E="1m">\'+l+"</j></j>"},1T:3(t){6 i=M;I(i=q.14?q.Y[t]["3D-1u"]:p.9(t).12("1M-3D-1u"),"1q"!=1v i&&M!==i){6 a=i.3H(0,1);i="."==a||"#"==a?e(i).1u():i,l.9(t).17(i)}},18:3(e){1F(6 t=e,i=0;i<=q.18&&!(i>=p.A-e);i++)4.1y(t+i,!0);1F(6 a=0;a<=q.18&&!(0>t-a);a++)4.1y(t-a,!0)},26:3(e,t){6 i=4;l.9(t).D(".Z").13("2i 3K",3(){l.9(t).8("2C")}),e===!1&&(l.9(t).J("2C")?i.18(t):l.9(t).D(".Z").13("2i 3K",3(){i.18(t)}))},1y:3(t,i){{6 a,n=4;p.A-t}q.18>p.A&&(q.18=p.A),q.2D===!0&&u<=q.3M&&(a=q.14?q.Y[t].2D:p.9(t).12("1M-3O-V")),a||(a=q.14?q.Y[t].V:p.9(t).12("1M-V"));6 s=0;i===!0&&(s=q.K+24),"1q"!=1v a&&""!==a?n.2S(a,t)?W(3(){l.9(t).J("1o")||(l.9(t).2B(n.3c(a,t)),n.1T(t),l.9(t).8("1o"),q.1O&&q.1z===!0&&U(h)),n.26(i,t)},s):W(3(){l.9(t).J("1o")||(l.9(t).2B(\'<1U E="Z" V="\'+a+\'" />\'),n.1T(t),l.9(t).8("1o")),n.26(i,t)},s):W(3(){I(!l.9(t).J("1o")){6 a=M;I(a=q.14?q.Y[t].1u:p.9(t).12("1M-1u"),"1q"!=1v a&&M!==a){6 s=a.3H(0,1);a="."==s||"#"==s?e(a).1u():a}"1q"!=1v a&&M!==a&&l.9(t).17(\'<j E="1m-1r" 2n="3q-19:\'+q.2x+\' !3B;"><j E="1m">\'+a+"</j></j>"),n.1T(t),l.9(t).8("1o 2C"),q.1O&&q.1z===!0&&U(h)}n.26(i,t)},s)},11:3(){I(q.11===!0){6 t=e("#B-2A > j").A;i.17("<j R=\'B-11\'><15 R=\'B-11-1Z\'></15> / <15 R=\'B-11-3T\'>"+t+"</15></j>")}},3A:3(){I(q.1h===!0&&p.A>1){6 t=4,a="";q.1i||(a=\'<15 E="1K 3x"><i E="3V-3W-3X-16" 3Y-3Z="2d"></i></15>\'),i.17(\'<j E="G-1r"><j E="G-3w">\'+a+\'</j><j E="G-1H"></j></j>\'),r=i.D(".G-1r"),s.3o(\'<a E="3u-G"></a>\'),s.45().8("46-G"),i.D(".3u-G").Q("10 1j",3(){i.8("O"),t.H()&&"7"===q.1k&&(l.9(b).2y().F("P-7").8("N-7"),l.9(b).2t().F("N-7").8("P-7"))}),i.D(".G-1r .1K").Q("10 1j",3(){i.F("O")});6 n,o=i.D(".G-3w"),d=i.D(".G-1H"),u="";I(q.14)1F(6 m=0;m<q.Y.A;m++)n=q.Y[m].G,u+=\'<j E="G"><1U V="\'+n+\'" /></j>\';22 p.2l(3(){n=q.1R===!1||"1q"==1v e(4).12(q.1R)||M===e(4).12(q.1R)?e(4).D("1U").12("V"):e(4).12(q.1R),u+=\'<j E="G"><1U V="\'+n+\'" /></j>\'});I(d.17(u),c=d.D(".G"),c.1l({"4e-2e":q.1B+"1N",19:q.1g+"1N"}),q.X===!0){6 f=p.A*(q.1g+q.1B);i.D(".G-1H").1l({19:f+"1N",4h:"4i","23-2O":q.K+"2K"})}c.Q("10 1j",3(){w=!0;6 i=e(4).1b();c.F("1W"),e(4).8("1W"),t.7(i),t.X(i),U(h)}),o.2B(\'<15 E="3x 4m">\'+q.3t.3v+" ("+c.A+")</15>"),q.1i&&i.8("O")}},X:3(e){I(q.X===!0){6 t,a=i.D(".G-1r").19();3N(q.3y){2o"1c":t=0;2E;2o"3C":t=a/2-q.1g/2;2E;2o"2e":t=a-q.1g}6 n=(q.1g+q.1B)*e-1-t,l=p.A*(q.1g+q.1B);n>l-a&&(n=l-a),0>n&&(n=0),4.H()?i.D(".G-1H").1l("4r","4s(-"+n+"1N, 3L, 3L)"):i.D(".G-1H").28({1c:-n+"1N"},q.K)}},2F:3(){6 e=4;q.2u===!0&&p.A>1&&(i.17(\'<j R="B-4v"><a R="B-N"></a><a R="B-P"></a></j>\'),s=i.D("#B-N"),o=i.D("#B-P"),s.Q("10",3(){e.1G(),U(h)}),o.Q("10",3(){e.1A(),U(h)}))},2G:3(){6 e=4;q.1O===!0&&(h=4w(3(){b=b+1<p.A?b:-1,b++,e.7(b)},q.2P))},3r:3(){6 t=4;e(1d).Q("3J.L",3(e){e.1C(),e.1Y(),37===e.1P&&(t.1G(),U(h)),38===e.1P&&q.1h===!0&&p.A>1?i.J("O")||(t.H()&&"7"===q.1k&&(l.9(b).2y().F("P-7").8("N-7"),l.9(b).2t().F("N-7").8("P-7")),i.8("O")):39===e.1P&&(t.1A(),U(h)),40===e.1P&&q.1h===!0&&p.A>1&&!q.1i?i.J("O")&&i.F("O"):q.3e===!0&&27===e.1P&&(!q.1i&&i.J("O")?i.F("O"):v.21(!1))})},1A:3(){6 e=4;b=l.1b(l.9(d)),b+1<p.A?(b++,e.7(b)):q.1Q?(b=0,e.7(b)):q.1h===!0&&p.A>1&&!q.1i?i.8("O"):(l.9(b).D(".Z").8("2e-1V"),W(3(){l.D(".Z").F("2e-1V")},24)),e.X(b),q.36.1e(4,v)},1G:3(){6 e=4;b=l.1b(l.9(d)),b>0?(b--,e.7(b)):q.1Q?(b=p.A-1,e.7(b)):q.1h===!0&&p.A>1&&!q.1i?i.8("O"):(l.9(b).D(".Z").8("1c-1V"),W(3(){l.D(".Z").F("1c-1V")},24)),e.X(b),q.35.1e(4,v)},7:3(t){6 i=4;I(C?(W(3(){i.1y(t,!1)},q.K+24),n.J("13")||n.8("13"),4.H()&&""!==q.K&&(n.J("K")||n.8("K"),x===!1&&(n.1l("23-2O",q.K+"2K"),x=!0)),4.H()&&""!==q.2m&&(n.J("2j")||n.8("2j"),T===!1&&(n.1l("23-2j-3",q.2m),T=!0)),q.3b.1e(4,v)):i.1y(t,!1),"7"===q.1k){6 a=M!==2J.4C.1E(/4D/i);!4.H()||n.J("7")||a?4.H()&&!n.J("2r-1c")&&a&&n.8("2r-1c"):n.8("7"),4.H()||C?!4.H()&&C&&n.28({1c:1D*-t+"%"},q.K,q.25):n.1l({1c:1D*-t+"%"})}22"29"===q.1k&&(4.H()&&!n.J("29-m")?n.8("29-m"):4.H()||n.J("28")||n.8("28"),4.H()||C?!4.H()&&C&&(l.9(d).2N(q.K,q.25),l.9(t).2Y(q.K,q.25)):(l.2N(1D),l.9(t).2Y(1D)));I(t+1>=p.A&&q.1O&&q.1Q===!1&&U(h),l.9(d).F("1Z"),l.9(t).8("1Z"),4.H()&&"7"===q.1k&&(w===!1?(e(".N-7").F("N-7"),e(".P-7").F("P-7"),l.9(t-1).8("N-7"),l.9(t+1).8("P-7")):(l.9(t).2y().F("P-7").8("N-7"),l.9(t).2t().F("N-7").8("P-7"))),q.1h===!0&&p.A>1&&(c.F("1W"),c.9(t).8("1W")),q.2u&&q.3n&&q.1Q===!1&&p.A>1){6 r=p.A;r=4H(r)-1,0===t?(s.8("1x"),o.F("1x")):t===r?(s.F("1x"),o.8("1x")):s.4J(o).F("1x")}d=t,C===!1?q.3i.1e(4,v):q.3a.1e(4,v),W(3(){C=!0}),w=!1,q.11&&e("#B-11-1Z").4K(t+1),e(1d).Q("2k.L",3(){W(3(){i.X(t)},4L)})}};1t v.4M=3(){1t g===!0?!0:!1},v.21=3(t){g=!1,t="1q"!=1v t?!1:!0,q.34.1e(4,v);6 n=C;C=!1,T=!1,x=!1,w=!1,U(h),t===!0&&p.1S("10 2h 2p"),e(".1I-1f").1S("2Q 2R"),e("1n").1S("2p.L 2M.L 1j.L"),e(1d).1S("2k.L 3J.L"),n===!0&&(i.8("29-m"),W(3(){a.4O(),e("1n").F("1I-1f")},4P)),q.2W.1e(4,v)},S.1w(),4}}(4Q);',62,301,'|||function|this||var|slide|addClass|eq||||||||||div|||||||||||||||||length|lg||find|class|removeClass|thumb|doCss|if|hasClass|speed|lightGallery|null|prev|open|next|bind|id|||clearInterval|src|setTimeout|animateThumb|dynamicEl|object|click|counter|attr|on|dynamic|span||append|preload|width|iframe|index|left|window|call|gallery|thumbWidth|thumbnail|showThumbByDefault|touchend|mode|css|video|body|loaded|com|undefined|cont|pageX|return|html|typeof|init|disabled|loadContent|videoAutoplay|nextSlide|thumbMargin|preventDefault|100|match|for|prevSlide|inner|light|selector|close|www|data|px|auto|keyCode|loop|exThumbImage|off|addHtml|img|end|active|be|stopPropagation|current||destroy|else|transition|400|easing|loadObj||animate|fade|targetTouches|originalEvent|enableTouch|true|right|embed|outer|touch|load|timing|resize|each|cssEasing|style|case|touchstart|in|use|vimeo|nextAll|controls|frameborder|amp|videoMaxWidth|prevAll|youtubePlayerParams|slider|prepend|complete|mobileSrc|break|slideTo|autoStart|closeSlide|closable|navigator|ms|pageY|touchmove|fadeOut|duration|pause|mousedown|mouseup|isVideo|document|void|youtu|onCloseAfter|watch|fadeIn|z0|9_|getWidth|9a|_|onBeforeClose|onSlidePrev|onSlideNext||||onSlideAfter|onSlideBefore|loadVideo|autoplay|escKey|wmode|opaque|structure|onOpen|560|height|315|children|hideControlOnEnd|after|allowfullscreen|max|keyPress|showAfterLoad|lang|cl|allPhotos|info|ib|currentPagerPosition|useCSS|buildThumbnail|important|middle|sub|vimeoColor|enableDrag|50|substring|swipeThreshold|keyup|error|0px|mobileSrcMaxWidth|switch|responsive|640|CCCCCC|allowFullScreen|photos|all|mozallowfullscreen|bUi|iCn|rMv|aria|hidden||All|webkitAllowFullScreen|color|portrait|parent|has|byline|player|http|youtube|855px|param|rel|margin|4e3|createTouch|position|relative|ontouchstart|onmsgesturechange|msMaxTouchPoints|count|extend|600|documentElement|KhtmlTransition|transform|translate3d|msTransition|linear|action|setInterval|OTransition|ease|WebkitTransition|MozTransition|is|userAgent|iPad|fn|target|show|parseInt|strict|add|text|200|isActive|opacity|remove|500|jQuery'.split('|'),0,{})) | ||
/* v1.1.6 08/25/2015 http://sachinchoolur.github.io/lightGallery*/ | ||
!function(e){"use strict";e.fn.lightGallery=function(t){var i,a,n,l,s,o,d,r,c,u,h,m={mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:600,addClass:"",closable:!0,loop:!1,auto:!1,pause:4e3,escKey:!0,controls:!0,hideControlOnEnd:!1,preload:1,showAfterLoad:!0,selector:null,index:!1,lang:{allPhotos:"All photos"},counter:!1,exThumbImage:!1,thumbnail:!0,showThumbByDefault:!1,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbMargin:5,mobileSrc:!1,mobileSrcMaxWidth:640,swipeThreshold:50,enableTouch:!0,enableDrag:!0,vimeoColor:"CCCCCC",youtubePlayerParams:!1,videoAutoplay:!0,videoMaxWidth:"855px",dynamic:!1,dynamicEl:[],onOpen:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onBeforeClose:function(){},onCloseAfter:function(){}},f=e(this),v=this,p=null,b=0,g=!1,C=!1,y=void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,w=!1,T=!1,x=!1,q=e.extend(!0,{},m,t),S={init:function(){f.each(function(){var t=e(this);q.dynamic?(p=q.dynamicEl,b=0,d=b,k.init(b)):(p=null!==q.selector?e(q.selector):t.children(),p.on("click",function(i){p=null!==q.selector?e(q.selector):t.children(),i.preventDefault(),i.stopPropagation(),b=p.index(this),d=b,k.init(b)}))})}},k={init:function(){g=!0,this.structure(),this.getWidth(),this.closeSlide(),this.autoStart(),this.counter(),this.slideTo(),this.buildThumbnail(),this.keyPress(),q.index?(this.slide(q.index),this.animateThumb(q.index)):(this.slide(b),this.animateThumb(b)),q.enableDrag&&this.touch(),q.enableTouch&&this.enableTouch(),setTimeout(function(){i.addClass("opacity")},50)},structure:function(){e("body").append('<div id="lg-outer" class="'+q.addClass+'"><div id="lg-gallery"><div id="lg-slider"></div><a id="lg-close" class="close"></a></div></div>').addClass("light-gallery"),a=e("#lg-outer"),i=e("#lg-gallery"),q.showAfterLoad===!0&&i.addClass("show-after-load"),n=i.find("#lg-slider");var t="";if(q.dynamic)for(var s=0;s<q.dynamicEl.length;s++)t+='<div class="lg-slide"></div>';else p.each(function(){t+='<div class="lg-slide"></div>'});n.append(t),l=i.find(".lg-slide")},closeSlide:function(){q.closable&&e("#lg-outer").on("click",function(t){e(t.target).is(".lg-slide")&&v.destroy(!1)}),e("#lg-close").bind("click touchend",function(){v.destroy(!1)})},getWidth:function(){var t=function(){u=e(window).width()};e(window).bind("resize.lightGallery",t())},doCss:function(){var e=function(){for(var e=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],t=document.documentElement,i=0;i<e.length;i++)if(e[i]in t.style)return!0};return q.useCSS&&e()?!0:!1},enableTouch:function(){var t=this;if(y){var i={},a={};e("body").on("touchstart.lightGallery",function(e){a=e.originalEvent.targetTouches[0],i.pageX=e.originalEvent.targetTouches[0].pageX,i.pageY=e.originalEvent.targetTouches[0].pageY}),e("body").on("touchmove.lightGallery",function(e){var t=e.originalEvent;a=t.targetTouches[0],e.preventDefault()}),e("body").on("touchend.lightGallery",function(){var e=a.pageX-i.pageX,n=q.swipeThreshold;e>=n?(t.prevSlide(),clearInterval(h)):-n>=e&&(t.nextSlide(),clearInterval(h))})}},touch:function(){var t,i,a=this;e(".light-gallery").bind("mousedown",function(e){e.stopPropagation(),e.preventDefault(),t=e.pageX}),e(".light-gallery").bind("mouseup",function(e){e.stopPropagation(),e.preventDefault(),i=e.pageX,i-t>20?a.prevSlide():t-i>20&&a.nextSlide()})},isVideo:function(e,t){var i=e.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i),a=e.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),n=!1;return q.dynamic?"true"==q.dynamicEl[t].iframe&&(n=!0):"true"==p.eq(t).attr("data-iframe")&&(n=!0),i||a||n?!0:void 0},loadVideo:function(t,i){var a=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i),n=t.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),l="",s="";if(a){if(s=q.videoAutoplay===!0&&C===!1?"?autoplay=1&rel=0&wmode=opaque":"?wmode=opaque",q.youtubePlayerParams){var o=e.param(q.youtubePlayerParams);s=s+"&"+o}l='<iframe class="object" width="560" height="315" src="//www.youtube.com/embed/'+a[1]+s+'" frameborder="0" allowfullscreen></iframe>'}else n?(s=q.videoAutoplay===!0&&C===!1?"autoplay=1&":"",l='<iframe class="object" id="video'+i+'" width="560" height="315" src="http://player.vimeo.com/video/'+n[1]+"?"+s+"byline=0&portrait=0&color="+q.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):l='<iframe class="object" frameborder="0" src="'+t+'" allowfullscreen="true"></iframe>';return'<div class="video-cont" style="max-width:'+q.videoMaxWidth+' !important;"><div class="video">'+l+"</div></div>"},addHtml:function(t){var i=null;if(i=q.dynamic?q.dynamicEl[t]["sub-html"]:p.eq(t).attr("data-sub-html"),"undefined"!=typeof i&&null!==i){var a=i.substring(0,1);i="."==a||"#"==a?e(i).html():i,l.eq(t).append(i)}},preload:function(e){for(var t=e,i=0;i<=q.preload&&!(i>=p.length-e);i++)this.loadContent(t+i,!0);for(var a=0;a<=q.preload&&!(0>t-a);a++)this.loadContent(t-a,!0)},loadObj:function(e,t){var i=this;l.eq(t).find(".object").on("load error",function(){l.eq(t).addClass("complete")}),e===!1&&(l.eq(t).hasClass("complete")?i.preload(t):l.eq(t).find(".object").on("load error",function(){i.preload(t)}))},loadContent:function(t,i){{var a,n=this;p.length-t}q.preload>p.length&&(q.preload=p.length),q.mobileSrc===!0&&u<=q.mobileSrcMaxWidth&&(a=q.dynamic?q.dynamicEl[t].mobileSrc:p.eq(t).attr("data-responsive-src")),a||(a=q.dynamic?q.dynamicEl[t].src:p.eq(t).attr("data-src"));var s=0;i===!0&&(s=q.speed+400),"undefined"!=typeof a&&""!==a?n.isVideo(a,t)?setTimeout(function(){l.eq(t).hasClass("loaded")||(l.eq(t).prepend(n.loadVideo(a,t)),n.addHtml(t),l.eq(t).addClass("loaded"),q.auto&&q.videoAutoplay===!0&&clearInterval(h)),n.loadObj(i,t)},s):setTimeout(function(){l.eq(t).hasClass("loaded")||(l.eq(t).prepend('<img class="object" src="'+a+'" />'),n.addHtml(t),l.eq(t).addClass("loaded")),n.loadObj(i,t)},s):setTimeout(function(){if(!l.eq(t).hasClass("loaded")){var a=null;if(a=q.dynamic?q.dynamicEl[t].html:p.eq(t).attr("data-html"),"undefined"!=typeof a&&null!==a){var s=a.substring(0,1);a="."==s||"#"==s?e(a).html():a}"undefined"!=typeof a&&null!==a&&l.eq(t).append('<div class="video-cont" style="max-width:'+q.videoMaxWidth+' !important;"><div class="video">'+a+"</div></div>"),n.addHtml(t),l.eq(t).addClass("loaded complete"),q.auto&&q.videoAutoplay===!0&&clearInterval(h)}n.loadObj(i,t)},s)},counter:function(){if(q.counter===!0){var t=e("#lg-slider > div").length;i.append("<div id='lg-counter'><span id='lg-counter-current'></span> / <span id='lg-counter-all'>"+t+"</span></div>")}},buildThumbnail:function(){if(q.thumbnail===!0&&p.length>1){var t=this,a="";q.showThumbByDefault||(a='<span class="close ib"><i class="bUi-iCn-rMv-16" aria-hidden="true"></i></span>'),i.append('<div class="thumb-cont"><div class="thumb-info">'+a+'</div><div class="thumb-inner"></div></div>'),r=i.find(".thumb-cont"),s&&(s.after('<a class="cl-thumb"></a>'),s.parent().addClass("has-thumb"),i.find(".cl-thumb").bind("click touchend",function(){i.addClass("open"),t.doCss()&&"slide"===q.mode&&(l.eq(b).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(b).nextAll().removeClass("prev-slide").addClass("next-slide"))})),i.find(".thumb-cont .close").bind("click touchend",function(){i.removeClass("open")});var n,o=i.find(".thumb-info"),d=i.find(".thumb-inner"),u="";if(q.dynamic)for(var m=0;m<q.dynamicEl.length;m++)n=q.dynamicEl[m].thumb,u+='<div class="thumb"><img src="'+n+'" /></div>';else p.each(function(){n=q.exThumbImage===!1||"undefined"==typeof e(this).attr(q.exThumbImage)||null===e(this).attr(q.exThumbImage)?e(this).find("img").attr("src"):e(this).attr(q.exThumbImage),u+='<div class="thumb"><img src="'+n+'" /></div>'});if(d.append(u),c=d.find(".thumb"),c.css({"margin-right":q.thumbMargin+"px",width:q.thumbWidth+"px"}),q.animateThumb===!0){var f=p.length*(q.thumbWidth+q.thumbMargin);i.find(".thumb-inner").css({width:f+"px",position:"relative","transition-duration":q.speed+"ms"})}c.bind("click touchend",function(){w=!0;var i=e(this).index();c.removeClass("active"),e(this).addClass("active"),t.slide(i),t.animateThumb(i),clearInterval(h)}),o.prepend('<span class="ib count">'+q.lang.allPhotos+" ("+c.length+")</span>"),q.showThumbByDefault&&i.addClass("open")}},animateThumb:function(e){if(q.animateThumb===!0){var t,a=i.find(".thumb-cont").width();switch(q.currentPagerPosition){case"left":t=0;break;case"middle":t=a/2-q.thumbWidth/2;break;case"right":t=a-q.thumbWidth}var n=(q.thumbWidth+q.thumbMargin)*e-1-t,l=p.length*(q.thumbWidth+q.thumbMargin);n>l-a&&(n=l-a),0>n&&(n=0),this.doCss()?i.find(".thumb-inner").css("transform","translate3d(-"+n+"px, 0px, 0px)"):i.find(".thumb-inner").animate({left:-n+"px"},q.speed)}},slideTo:function(){var e=this;q.controls===!0&&p.length>1&&(i.append('<div id="lg-action"><a id="lg-prev"></a><a id="lg-next"></a></div>'),s=i.find("#lg-prev"),o=i.find("#lg-next"),s.bind("click",function(){e.prevSlide(),clearInterval(h)}),o.bind("click",function(){e.nextSlide(),clearInterval(h)}))},autoStart:function(){var e=this;q.auto===!0&&(h=setInterval(function(){b=b+1<p.length?b:-1,b++,e.slide(b)},q.pause))},keyPress:function(){var t=this;e(window).bind("keyup.lightGallery",function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode&&(t.prevSlide(),clearInterval(h)),38===e.keyCode&&q.thumbnail===!0&&p.length>1?i.hasClass("open")||(t.doCss()&&"slide"===q.mode&&(l.eq(b).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(b).nextAll().removeClass("prev-slide").addClass("next-slide")),i.addClass("open")):39===e.keyCode&&(t.nextSlide(),clearInterval(h)),40===e.keyCode&&q.thumbnail===!0&&p.length>1&&!q.showThumbByDefault?i.hasClass("open")&&i.removeClass("open"):q.escKey===!0&&27===e.keyCode&&(!q.showThumbByDefault&&i.hasClass("open")?i.removeClass("open"):v.destroy(!1))})},nextSlide:function(){var e=this;b=l.index(l.eq(d)),b+1<p.length?(b++,e.slide(b)):q.loop?(b=0,e.slide(b)):q.thumbnail===!0&&p.length>1&&!q.showThumbByDefault?i.addClass("open"):(l.eq(b).find(".object").addClass("right-end"),setTimeout(function(){l.find(".object").removeClass("right-end")},400)),e.animateThumb(b),q.onSlideNext.call(this,v)},prevSlide:function(){var e=this;b=l.index(l.eq(d)),b>0?(b--,e.slide(b)):q.loop?(b=p.length-1,e.slide(b)):q.thumbnail===!0&&p.length>1&&!q.showThumbByDefault?i.addClass("open"):(l.eq(b).find(".object").addClass("left-end"),setTimeout(function(){l.find(".object").removeClass("left-end")},400)),e.animateThumb(b),q.onSlidePrev.call(this,v)},slide:function(t){var i=this;if(C?(setTimeout(function(){i.loadContent(t,!1)},q.speed+400),n.hasClass("on")||n.addClass("on"),this.doCss()&&""!==q.speed&&(n.hasClass("speed")||n.addClass("speed"),x===!1&&(n.css("transition-duration",q.speed+"ms"),x=!0)),this.doCss()&&""!==q.cssEasing&&(n.hasClass("timing")||n.addClass("timing"),T===!1&&(n.css("transition-timing-function",q.cssEasing),T=!0)),q.onSlideBefore.call(this,v)):i.loadContent(t,!1),"slide"===q.mode){var a=null!==navigator.userAgent.match(/iPad/i);!this.doCss()||n.hasClass("slide")||a?this.doCss()&&!n.hasClass("use-left")&&a&&n.addClass("use-left"):n.addClass("slide"),this.doCss()||C?!this.doCss()&&C&&n.animate({left:100*-t+"%"},q.speed,q.easing):n.css({left:100*-t+"%"})}else"fade"===q.mode&&(this.doCss()&&!n.hasClass("fade-m")?n.addClass("fade-m"):this.doCss()||n.hasClass("animate")||n.addClass("animate"),this.doCss()||C?!this.doCss()&&C&&(l.eq(d).fadeOut(q.speed,q.easing),l.eq(t).fadeIn(q.speed,q.easing)):(l.fadeOut(100),l.eq(t).fadeIn(100)));if(t+1>=p.length&&q.auto&&q.loop===!1&&clearInterval(h),l.eq(d).removeClass("current"),l.eq(t).addClass("current"),this.doCss()&&"slide"===q.mode&&(w===!1?(e(".prev-slide").removeClass("prev-slide"),e(".next-slide").removeClass("next-slide"),l.eq(t-1).addClass("prev-slide"),l.eq(t+1).addClass("next-slide")):(l.eq(t).prevAll().removeClass("next-slide").addClass("prev-slide"),l.eq(t).nextAll().removeClass("prev-slide").addClass("next-slide"))),q.thumbnail===!0&&p.length>1&&(c.removeClass("active"),c.eq(t).addClass("active")),q.controls&&q.hideControlOnEnd&&q.loop===!1&&p.length>1){var r=p.length;r=parseInt(r)-1,0===t?(s.addClass("disabled"),o.removeClass("disabled")):t===r?(s.removeClass("disabled"),o.addClass("disabled")):s.add(o).removeClass("disabled")}d=t,C===!1?q.onOpen.call(this,v):q.onSlideAfter.call(this,v),setTimeout(function(){C=!0}),w=!1,q.counter&&e("#lg-counter-current").text(t+1),e(window).bind("resize.lightGallery",function(){setTimeout(function(){i.animateThumb(t)},200)})}};return v.isActive=function(){return g===!0?!0:!1},v.destroy=function(t){g=!1,t="undefined"!=typeof t?!1:!0,q.onBeforeClose.call(this,v);var n=C;C=!1,T=!1,x=!1,w=!1,clearInterval(h),t===!0&&p.off("click touch touchstart"),e(".light-gallery").off("mousedown mouseup"),e("body").off("touchstart.lightGallery touchmove.lightGallery touchend.lightGallery"),e(window).off("resize.lightGallery keyup.lightGallery"),n===!0&&(i.addClass("fade-m"),setTimeout(function(){a.remove(),e("body").removeClass("light-gallery")},500)),q.onCloseAfter.call(this,v)},S.init(),this}}(jQuery); |
{ | ||
"name": "lightgallery", | ||
"description": "Responsive & Touch-Friendly jQuery Gallery Lightbox Plugin", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "gallery", |
jQuery lightGallery | ||
============= | ||
Announcement. | ||
---------------- | ||
Here is the first look of [lightgallery1.2](http://sachinchoolur.github.io/lightgallery1.2/). | ||
Watch this space i will be releasing soon!. | ||
@@ -177,8 +181,3 @@ Demo | ||
vimeoColor: 'CCCCCC', | ||
youtubePlayerParams: { | ||
modestbranding: 1, | ||
showinfo: 0, | ||
rel: 0, | ||
controls: 0 | ||
}, | ||
youtubePlayerParams: false, // See: https://developers.google.com/youtube/player_parameters, | ||
videoAutoplay: true, | ||
@@ -220,3 +219,3 @@ videoMaxWidth: '855px', | ||
If you need any help with implementing lightGallery in your project or if you any personal support requests i requset you to please use [stackoverflow](https://stackoverflow.com/) instead of github issue tracker | ||
If you need any help with implementing lightGallery in your project or if have you any personal support requests i requset you to please use [stackoverflow](https://stackoverflow.com/) instead of github issue tracker | ||
@@ -223,0 +222,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
917859
1514
224