From 42d1569369f29398b7137f33dea3583cb872bacc Mon Sep 17 00:00:00 2001 From: Dirk Groenen Date: Thu, 17 Dec 2015 21:53:34 +0100 Subject: [PATCH] Recompiled with correct version to be sure, #34 --- bower.json | 2 +- dist/jquery.viewportchecker.min.js | 4 ++-- dist/jquery.viewportchecker.min.js.map | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index 7fc5914..6e4c8da 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jQuery-viewport-checker", - "version": "1.8.6", + "version": "1.8.7", "homepage": "https://github.com/dirkgroenen/jQuery-viewport-checker", "authors": [ "Dirk Groenen ", diff --git a/dist/jquery.viewportchecker.min.js b/dist/jquery.viewportchecker.min.js index 9a8f49b..50c66c0 100644 --- a/dist/jquery.viewportchecker.min.js +++ b/dist/jquery.viewportchecker.min.js @@ -1,10 +1,10 @@ /** - * jQuery-viewport-checker - v1.8.5 - 2015-10-12 + * jQuery-viewport-checker - v1.8.7 - 2015-12-17 * https://github.com/dirkgroenen/jQuery-viewport-checker * * Copyright (c) 2015 Dirk Groenen * Licensed MIT */ -!function(a){a.fn.viewportChecker=function(b){var c={classToAdd:"visible",classToRemove:"invisible",classToAddForFullView:"full-visible",removeClassAfterAnimation:!1,offset:100,repeat:!1,invertBottomOffset:!0,callbackFunction:function(a,b){},scrollHorizontal:!1,scrollBox:window};a.extend(c,b);var d=this,e={height:a(c.scrollBox).height(),width:a(c.scrollBox).width()},f=-1!=navigator.userAgent.toLowerCase().indexOf("webkit")||-1!=navigator.userAgent.toLowerCase().indexOf("windows phone")?"body":"html";return this.checkElements=function(){var b,g;c.scrollHorizontal?(b=a(f).scrollLeft(),g=b+e.width):(b=a(f).scrollTop(),g=b+e.height),d.each(function(){var d=a(this),f={},h={};if(d.data("vp-add-class")&&(h.classToAdd=d.data("vp-add-class")),d.data("vp-remove-class")&&(h.classToRemove=d.data("vp-remove-class")),d.data("vp-add-class-full-view")&&(h.classToAddForFullView=d.data("vp-add-class-full-view")),d.data("vp-keep-add-class")&&(h.removeClassAfterAnimation=d.data("vp-remove-after-animation")),d.data("vp-offset")&&(h.offset=d.data("vp-offset")),d.data("vp-repeat")&&(h.repeat=d.data("vp-repeat")),d.data("vp-scrollHorizontal")&&(h.scrollHorizontal=d.data("vp-scrollHorizontal")),d.data("vp-invertBottomOffset")&&(h.scrollHorizontal=d.data("vp-invertBottomOffset")),a.extend(f,c),a.extend(f,h),!d.data("vp-animated")||f.repeat){String(f.offset).indexOf("%")>0&&(f.offset=parseInt(f.offset)/100*e.height);var i=f.scrollHorizontal?d.offset().left:d.offset().top,j=f.scrollHorizontal?i+d.width():i+d.height(),k=Math.round(i)+f.offset,l=f.scrollHorizontal?k+d.width():k+d.height();f.invertBottomOffset&&(l-=2*f.offset),g>k&&l>b?(d.removeClass(f.classToRemove),d.addClass(f.classToAdd),f.callbackFunction(d,"add"),g>=j&&i>=b?d.addClass(f.classToAddForFullView):d.removeClass(f.classToAddForFullView),d.data("vp-animated",!0),f.removeClassAfterAnimation||d.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){d.removeClass(f.classToAdd)})):d.hasClass(f.classToAdd)&&f.repeat&&(d.removeClass(f.classToAdd+" "+f.classToAddForFullView),f.callbackFunction(d,"remove"),d.data("vp-animated",!1))}})},("ontouchstart"in window||"onmsgesturechange"in window)&&a(document).bind("touchmove MSPointerMove pointermove",this.checkElements),a(c.scrollBox).bind("load scroll",this.checkElements),a(window).resize(function(b){e={height:a(c.scrollBox).height(),width:a(c.scrollBox).width()},d.checkElements()}),this.checkElements(),this}}(jQuery); +!function(a){a.fn.viewportChecker=function(b){var c={classToAdd:"visible",classToRemove:"invisible",classToAddForFullView:"full-visible",removeClassAfterAnimation:!1,offset:100,repeat:!1,invertBottomOffset:!0,callbackFunction:function(a,b){},scrollHorizontal:!1,scrollBox:window};a.extend(c,b);var d=this,e={height:a(c.scrollBox).height(),width:a(c.scrollBox).width()},f=-1!=navigator.userAgent.toLowerCase().indexOf("webkit")||-1!=navigator.userAgent.toLowerCase().indexOf("windows phone")?"body":"html";return this.checkElements=function(){var b,g;c.scrollHorizontal?(b=a(f).scrollLeft(),g=b+e.width):(b=a(f).scrollTop(),g=b+e.height),d.each(function(){var d=a(this),f={},h={};if(d.data("vp-add-class")&&(h.classToAdd=d.data("vp-add-class")),d.data("vp-remove-class")&&(h.classToRemove=d.data("vp-remove-class")),d.data("vp-add-class-full-view")&&(h.classToAddForFullView=d.data("vp-add-class-full-view")),d.data("vp-keep-add-class")&&(h.removeClassAfterAnimation=d.data("vp-remove-after-animation")),d.data("vp-offset")&&(h.offset=d.data("vp-offset")),d.data("vp-repeat")&&(h.repeat=d.data("vp-repeat")),d.data("vp-scrollHorizontal")&&(h.scrollHorizontal=d.data("vp-scrollHorizontal")),d.data("vp-invertBottomOffset")&&(h.scrollHorizontal=d.data("vp-invertBottomOffset")),a.extend(f,c),a.extend(f,h),!d.data("vp-animated")||f.repeat){String(f.offset).indexOf("%")>0&&(f.offset=parseInt(f.offset)/100*e.height);var i=f.scrollHorizontal?d.offset().left:d.offset().top,j=f.scrollHorizontal?i+d.width():i+d.height(),k=Math.round(i)+f.offset,l=f.scrollHorizontal?k+d.width():k+d.height();f.invertBottomOffset&&(l-=2*f.offset),g>k&&l>b?(d.removeClass(f.classToRemove),d.addClass(f.classToAdd),f.callbackFunction(d,"add"),g>=j&&i>=b?d.addClass(f.classToAddForFullView):d.removeClass(f.classToAddForFullView),d.data("vp-animated",!0),f.removeClassAfterAnimation&&d.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){d.removeClass(f.classToAdd)})):d.hasClass(f.classToAdd)&&f.repeat&&(d.removeClass(f.classToAdd+" "+f.classToAddForFullView),f.callbackFunction(d,"remove"),d.data("vp-animated",!1))}})},("ontouchstart"in window||"onmsgesturechange"in window)&&a(document).bind("touchmove MSPointerMove pointermove",this.checkElements),a(c.scrollBox).bind("load scroll",this.checkElements),a(window).resize(function(b){e={height:a(c.scrollBox).height(),width:a(c.scrollBox).width()},d.checkElements()}),this.checkElements(),this}}(jQuery); //# sourceMappingURL=jquery.viewportchecker.min.js.map \ No newline at end of file diff --git a/dist/jquery.viewportchecker.min.js.map b/dist/jquery.viewportchecker.min.js.map index e708e2e..b3bab82 100644 --- a/dist/jquery.viewportchecker.min.js.map +++ b/dist/jquery.viewportchecker.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/jquery.viewportchecker.js"],"names":["$","fn","viewportChecker","useroptions","options","classToAdd","classToRemove","classToAddForFullView","removeClassAfterAnimation","offset","repeat","invertBottomOffset","callbackFunction","elem","action","scrollHorizontal","scrollBox","window","extend","$elem","this","boxSize","height","width","scrollElem","navigator","userAgent","toLowerCase","indexOf","checkElements","viewportStart","viewportEnd","scrollLeft","scrollTop","each","$obj","objOptions","attrOptions","data","String","parseInt","rawStart","left","top","rawEnd","elemStart","Math","round","elemEnd","removeClass","addClass","one","hasClass","document","bind","resize","e","jQuery"],"mappings":";;;;;;;;CAgBA,SAAUA,GACNA,EAAEC,GAAGC,gBAAkB,SAASC,GAE5B,GAAIC,IACAC,WAAY,UACZC,cAAgB,YAChBC,sBAAwB,eACxBC,2BAA2B,EAC3BC,OAAQ,IACRC,QAAQ,EACRC,oBAAoB,EACpBC,iBAAkB,SAASC,EAAMC,KACjCC,kBAAkB,EAClBC,UAAWC,OAEfjB,GAAEkB,OAAOd,EAASD,EAGlB,IAAIgB,GAAQC,KACRC,GAAWC,OAAQtB,EAAEI,EAAQY,WAAWM,SAAUC,MAAOvB,EAAEI,EAAQY,WAAWO,SAC9EC,EAAsE,IAAvDC,UAAUC,UAAUC,cAAcC,QAAQ,WAAiF,IAA9DH,UAAUC,UAAUC,cAAcC,QAAQ,iBAA0B,OAAS,MAsI7J,OAjIAR,MAAKS,cAAgB,WACjB,GAAIC,GAAeC,CAGd3B,GAAQW,kBAKTe,EAAgB9B,EAAEwB,GAAYQ,aAC9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K,EAAKc,YAAYb,EAAW9B,eAC5B6B,EAAKe,SAASd,EAAW/B,YAGzB+B,EAAWxB,iBAAiBuB,EAAM,OAGpBJ,GAAVa,GAAyBH,GAAYX,EACrCK,EAAKe,SAASd,EAAW7B,uBAEzB4B,EAAKc,YAAYb,EAAW7B,uBAGhC4B,EAAKG,KAAK,eAAe,GAEpBF,EAAW5B,2BACZ2B,EAAKgB,IAAI,+EAAgF,WACrFhB,EAAKc,YAAYb,EAAW/B,eAK7B8B,EAAKiB,SAAShB,EAAW/B,aAAgB+B,EAAiB,SACjED,EAAKc,YAAYb,EAAW/B,WAAa,IAAM+B,EAAW7B,uBAG1D6B,EAAWxB,iBAAiBuB,EAAM,UAGlCA,EAAKG,KAAK,eAAe,SAiBjC,gBAAkBrB,SAAU,qBAAuBA,UAEnDjB,EAAEqD,UAAUC,KAAK,sCAAuClC,KAAKS,eAIjE7B,EAAEI,EAAQY,WAAWsC,KAAK,cAAelC,KAAKS,eAG9C7B,EAAEiB,QAAQsC,OAAO,SAASC,GACtBnC,GAAWC,OAAQtB,EAAEI,EAAQY,WAAWM,SAAUC,MAAOvB,EAAEI,EAAQY,WAAWO,SAC9EJ,EAAMU,kBAIVT,KAAKS,gBAGET,OAEZqC","file":"jquery.viewportchecker.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/jquery.viewportchecker.js"],"names":["$","fn","viewportChecker","useroptions","options","classToAdd","classToRemove","classToAddForFullView","removeClassAfterAnimation","offset","repeat","invertBottomOffset","callbackFunction","elem","action","scrollHorizontal","scrollBox","window","extend","$elem","this","boxSize","height","width","scrollElem","navigator","userAgent","toLowerCase","indexOf","checkElements","viewportStart","viewportEnd","scrollLeft","scrollTop","each","$obj","objOptions","attrOptions","data","String","parseInt","rawStart","left","top","rawEnd","elemStart","Math","round","elemEnd","removeClass","addClass","one","hasClass","document","bind","resize","e","jQuery"],"mappings":";;;;;;;;CAgBA,SAAUA,GACNA,EAAEC,GAAGC,gBAAkB,SAASC,GAE5B,GA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O,SAC9EJ,EAAMU,kBAIVT,KAAKS,gBAGET,OAEZqC","file":"jquery.viewportchecker.min.js"} \ No newline at end of file diff --git a/package.json b/package.json index 5547839..522a34b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jQuery-viewport-checker", "author": "Dirk Groenen", - "version": "1.8.6", + "version": "1.8.7", "homepage": "https://github.com/dirkgroenen/jQuery-viewport-checker", "description": "Little script that detects if an element is in the viewport and adds a class to it.", "repository": "https://github.com/dirkgroenen/jQuery-viewport-checker",