Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
scripts.jQuery.jquery.dimensions-min.js Maven / Gradle / Ivy
(function(D){var A=D.fn.height,C=D.fn.width;D.fn.extend({height:function(){if(this[0]==window){return self.innerHeight||D.boxModel&&document.documentElement.clientHeight||document.body.clientHeight}if(this[0]==document){return Math.max(document.body.scrollHeight,document.body.offsetHeight)}return A.apply(this,arguments)},width:function(){if(this[0]==window){return self.innerWidth||D.boxModel&&document.documentElement.clientWidth||document.body.clientWidth}if(this[0]==document){return Math.max(document.body.scrollWidth,document.body.offsetWidth)}return C.apply(this,arguments)},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-B(this,"borderTopWidth")-B(this,"borderBottomWidth"):this.height()+B(this,"paddingTop")+B(this,"paddingBottom")},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-B(this,"borderLeftWidth")-B(this,"borderRightWidth"):this.width()+B(this,"paddingLeft")+B(this,"paddingRight")},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight:this.height()+B(this,"borderTopWidth")+B(this,"borderBottomWidth")+B(this,"paddingTop")+B(this,"paddingBottom")},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth:this.width()+B(this,"borderLeftWidth")+B(this,"borderRightWidth")+B(this,"paddingLeft")+B(this,"paddingRight")},scrollLeft:function(F){if(F!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(F,D(window).scrollTop())}else{this.scrollLeft=F}})}if(this[0]==window||this[0]==document){return self.pageXOffset||D.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft}return this[0].scrollLeft},scrollTop:function(F){if(F!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(D(window).scrollLeft(),F)}else{this.scrollTop=F}})}if(this[0]==window||this[0]==document){return self.pageYOffset||D.boxModel&&document.documentElement.scrollTop||document.body.scrollTop}return this[0].scrollTop},position:function(O,J){var G=this[0],M=G.parentNode,I=G.offsetParent,O=D.extend({margin:false,border:false,padding:false,scroll:false},O||{}),L=G.offsetLeft,K=G.offsetTop,H=G.scrollLeft,N=G.scrollTop;if(D.browser.mozilla||D.browser.msie){L+=B(G,"borderLeftWidth");K+=B(G,"borderTopWidth")}if(D.browser.mozilla){do{if(D.browser.mozilla&&M!=G&&D.css(M,"overflow")!="visible"){L+=B(M,"borderLeftWidth");K+=B(M,"borderTopWidth")}if(M==I){break}}while((M=M.parentNode)&&(M.tagName.toLowerCase()!="body"||M.tagName.toLowerCase()!="html"))}var F=E(G,O,L,K,H,N);if(J){D.extend(J,F);return this}else{return F}},offset:function(G,L){var K=0,J=0,T=0,O=0,U=this[0],I=this[0],H,F,S=D.css(U,"position"),R=D.browser.mozilla,M=D.browser.msie,W=D.browser.safari,Q=D.browser.opera,N=false,P=false,G=D.extend({margin:true,border:false,padding:false,scroll:true,lite:false},G||{});if(G.lite){return this.offsetLite(G,L)}if(U.tagName.toLowerCase()=="body"){K=U.offsetLeft;J=U.offsetTop;if(R){K+=B(U,"marginLeft")+(B(U,"borderLeftWidth")*2);J+=B(U,"marginTop")+(B(U,"borderTopWidth")*2)}else{if(Q){K+=B(U,"marginLeft");J+=B(U,"marginTop")}else{if(M&&jQuery.boxModel){K+=B(U,"borderLeftWidth");J+=B(U,"borderTopWidth")}}}}else{do{F=D.css(I,"position");K+=I.offsetLeft;J+=I.offsetTop;if(R||M){K+=B(I,"borderLeftWidth");J+=B(I,"borderTopWidth");if(R&&F=="absolute"){N=true}if(M&&F=="relative"){P=true}}H=I.offsetParent;if(G.scroll||R){do{if(G.scroll){T+=I.scrollLeft;O+=I.scrollTop}if(R&&I!=U&&D.css(I,"overflow")!="visible"){K+=B(I,"borderLeftWidth");J+=B(I,"borderTopWidth")}I=I.parentNode}while(I!=H)}I=H;if(I.tagName.toLowerCase()=="body"||I.tagName.toLowerCase()=="html"){if((W||(M&&D.boxModel))&&S!="absolute"&&S!="fixed"){K+=B(I,"marginLeft");J+=B(I,"marginTop")}if((R&&!N&&S!="fixed")||(M&&S=="static"&&!P)){K+=B(I,"borderLeftWidth");J+=B(I,"borderTopWidth")}break}}while(I)}var V=E(U,G,K,J,T,O);if(L){D.extend(L,V);return this}else{return V}},offsetLite:function(N,I){var K=0,J=0,G=0,M=0,L=this[0],H,N=D.extend({margin:true,border:false,padding:false,scroll:true},N||{});do{K+=L.offsetLeft;J+=L.offsetTop;H=L.offsetParent;if(N.scroll){do{G+=L.scrollLeft;M+=L.scrollTop;L=L.parentNode}while(L!=H)}L=H}while(L&&L.tagName.toLowerCase()!="body"&&L.tagName.toLowerCase()!="html");var F=E(this[0],N,K,J,G,M);if(I){D.extend(I,F);return this}else{return F}}});var B=function(F,G){return parseInt(D.css(F.jquery?F[0]:F,G))||0};var E=function(J,I,G,K,F,H){if(!I.margin){G-=B(J,"marginLeft");K-=B(J,"marginTop")}if(I.border&&(D.browser.safari||D.browser.opera)){G+=B(J,"borderLeftWidth");K+=B(J,"borderTopWidth")}else{if(!I.border&&!(D.browser.safari||D.browser.opera)){G-=B(J,"borderLeftWidth");K-=B(J,"borderTopWidth")}}if(I.padding){G+=B(J,"paddingLeft");K+=B(J,"paddingTop")}if(I.scroll){F-=J.scrollLeft;H-=J.scrollTop}return I.scroll?{top:K-H,left:G-F,scrollTop:H,scrollLeft:F}:{top:K,left:G}}})(jQuery);