From 9b0a1bcf90d8ea7c4f5986690eaeb5d70823f1d6 Mon Sep 17 00:00:00 2001 From: Pavel Kulbakin Date: Sat, 15 Aug 2015 13:40:04 +0300 Subject: [PATCH 1/2] Introduce lock parameter to allign desination element to viewport --- README.markdown | 1 + jquery.scrollintoview.js | 18 ++++++++++++++++-- jquery.scrollintoview.min.js | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index e60f055..a876e52 100644 --- a/README.markdown +++ b/README.markdown @@ -12,6 +12,7 @@ $("some_selector").scrollintoview(); And that's it really. This is of course if we use defaults. It also supports some configuration possibilities that should be provided as an `options` object along with the call: +* **block** (default: null) - alignment of the destination element relative to the viewport (start, end) * **duration** (default: "fast") - specified the same as with jQuery animate function; it can be provided as a string (slow, normal, fast) or a number of milliseconds that specifies animation duration * **direction** (default: "both") - scrolling can be performed in three different directions: * **x** or **horizontal** diff --git a/jquery.scrollintoview.js b/jquery.scrollintoview.js index 2f7049e..7850351 100644 --- a/jquery.scrollintoview.js +++ b/jquery.scrollintoview.js @@ -19,6 +19,7 @@ }; var settings = { + block: null, // "start" | "end" duration: "fast", direction: "both" }; @@ -74,6 +75,7 @@ scrollintoview: function (options) { /// Scrolls the first element in the set into view by scrolling its closest scrollable parent. /// Additional options that can configure scrolling: + /// block (default: null) - alignment destination element realative to the view port ("start" or "end") /// duration (default: "fast") - jQuery animation speed (can be a duration string or number of milliseconds) /// direction (default: "both") - select possible scrollings ("vertical" or "y", "horizontal" or "x", "both") /// complete (default: none) - a function to call when scrolling completes (called in context of the DOM element being scrolled) @@ -112,7 +114,13 @@ // vertical scroll if (options.direction.y === true) { - if (rel.top < 0) + if ('start' == options.block) { + animOptions.scrollTop = rel.top; + } + else if ('end' == options.block) { + animOptions.scrollTop = -rel.bottom; + } + else if (rel.top < 0) { animOptions.scrollTop = dim.s.scroll.top + rel.top; } @@ -125,7 +133,13 @@ // horizontal scroll if (options.direction.x === true) { - if (rel.left < 0) + if ('start' == options.block) { + animOptions.scrollLeft = rel.left; + } + else if ('end' == options.block) { + animOptions.scrollLeft = -rel.right; + } + else if (rel.left < 0) { animOptions.scrollLeft = dim.s.scroll.left + rel.left; } diff --git a/jquery.scrollintoview.min.js b/jquery.scrollintoview.min.js index b1a4b6f..e61ce0c 100644 --- a/jquery.scrollintoview.min.js +++ b/jquery.scrollintoview.min.js @@ -8,4 +8,4 @@ * Licensed under the terms of the MIT license * http://www.opensource.org/licenses/mit-license.php */ -(function(f){var c={vertical:{x:false,y:true},horizontal:{x:true,y:false},both:{x:true,y:true},x:{x:true,y:false},y:{x:false,y:true}};var b={duration:"fast",direction:"both"};var e=/^(?:html)$/i;var g=function(k,j){j=j||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(k,null):k.currentStyle);var i=document.defaultView&&document.defaultView.getComputedStyle?true:false;var h={top:(parseFloat(i?j.borderTopWidth:f.css(k,"borderTopWidth"))||0),left:(parseFloat(i?j.borderLeftWidth:f.css(k,"borderLeftWidth"))||0),bottom:(parseFloat(i?j.borderBottomWidth:f.css(k,"borderBottomWidth"))||0),right:(parseFloat(i?j.borderRightWidth:f.css(k,"borderRightWidth"))||0)};return{top:h.top,left:h.left,bottom:h.bottom,right:h.right,vertical:h.top+h.bottom,horizontal:h.left+h.right}};var d=function(h){var j=f(window);var i=e.test(h[0].nodeName);return{border:i?{top:0,left:0,bottom:0,right:0}:g(h[0]),scroll:{top:(i?j:h).scrollTop(),left:(i?j:h).scrollLeft()},scrollbar:{right:i?0:h.innerWidth()-h[0].clientWidth,bottom:i?0:h.innerHeight()-h[0].clientHeight},rect:(function(){var k=h[0].getBoundingClientRect();return{top:i?0:k.top,left:i?0:k.left,bottom:i?h[0].clientHeight:k.bottom,right:i?h[0].clientWidth:k.right}})()}};f.fn.extend({scrollintoview:function(j){j=f.extend({},b,j);j.direction=c[typeof(j.direction)==="string"&&j.direction.toLowerCase()]||c.both;var n="";if(j.direction.x===true){n="horizontal"}if(j.direction.y===true){n=n?"both":"vertical"}var l=this.eq(0);var i=l.closest(":scrollable("+n+")");if(i.length>0){i=i.eq(0);var m={e:d(l),s:d(i)};var h={top:m.e.rect.top-(m.s.rect.top+m.s.border.top),bottom:m.s.rect.bottom-m.s.border.bottom-m.s.scrollbar.bottom-m.e.rect.bottom,left:m.e.rect.left-(m.s.rect.left+m.s.border.left),right:m.s.rect.right-m.s.border.right-m.s.scrollbar.right-m.e.rect.right};var k={};if(j.direction.y===true){if(h.top<0){k.scrollTop=m.s.scroll.top+h.top}else{if(h.top>0&&h.bottom<0){k.scrollTop=m.s.scroll.top+Math.min(h.top,-h.bottom)}}}if(j.direction.x===true){if(h.left<0){k.scrollLeft=m.s.scroll.left+h.left}else{if(h.left>0&&h.right<0){k.scrollLeft=m.s.scroll.left+Math.min(h.left,-h.right)}}}if(!f.isEmptyObject(k)){if(e.test(i[0].nodeName)){i=f("html,body")}i.animate(k,j.duration).eq(0).queue(function(o){f.isFunction(j.complete)&&j.complete.call(i[0]);o()})}else{f.isFunction(j.complete)&&j.complete.call(i[0])}}return this}});var a={auto:true,scroll:true,visible:false,hidden:false};f.extend(f.expr[":"],{scrollable:function(k,i,n,h){var m=c[typeof(n[3])==="string"&&n[3].toLowerCase()]||c.both;var l=(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(k,null):k.currentStyle);var o={x:a[l.overflowX.toLowerCase()]||false,y:a[l.overflowY.toLowerCase()]||false,isRoot:e.test(k.nodeName)};if(!o.x&&!o.y&&!o.isRoot){return false}var j={height:{scroll:k.scrollHeight,client:k.clientHeight},width:{scroll:k.scrollWidth,client:k.clientWidth},scrollableX:function(){return(o.x||o.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(o.y||o.isRoot)&&this.height.scroll>this.height.client}};return m.y&&j.scrollableY()||m.x&&j.scrollableX()}})})(jQuery); +!function(t){var e={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},o={block:null,duration:"fast",direction:"both"},l=/^(?:html)$/i,r=function(e,o){o=o||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle);var l=document.defaultView&&document.defaultView.getComputedStyle?!0:!1,r={top:parseFloat(l?o.borderTopWidth:t.css(e,"borderTopWidth"))||0,left:parseFloat(l?o.borderLeftWidth:t.css(e,"borderLeftWidth"))||0,bottom:parseFloat(l?o.borderBottomWidth:t.css(e,"borderBottomWidth"))||0,right:parseFloat(l?o.borderRightWidth:t.css(e,"borderRightWidth"))||0};return{top:r.top,left:r.left,bottom:r.bottom,right:r.right,vertical:r.top+r.bottom,horizontal:r.left+r.right}},i=function(e){var o=t(window),i=l.test(e[0].nodeName);return{border:i?{top:0,left:0,bottom:0,right:0}:r(e[0]),scroll:{top:(i?o:e).scrollTop(),left:(i?o:e).scrollLeft()},scrollbar:{right:i?0:e.innerWidth()-e[0].clientWidth,bottom:i?0:e.innerHeight()-e[0].clientHeight},rect:function(){var t=e[0].getBoundingClientRect();return{top:i?0:t.top,left:i?0:t.left,bottom:i?e[0].clientHeight:t.bottom,right:i?e[0].clientWidth:t.right}}()}};t.fn.extend({scrollintoview:function(r){r=t.extend({},o,r),r.direction=e["string"==typeof r.direction&&r.direction.toLowerCase()]||e.both;var c="";r.direction.x===!0&&(c="horizontal"),r.direction.y===!0&&(c=c?"both":"vertical");var n=this.eq(0),s=n.closest(":scrollable("+c+")");if(s.length>0){s=s.eq(0);var d={e:i(n),s:i(s)},h={top:d.e.rect.top-(d.s.rect.top+d.s.border.top),bottom:d.s.rect.bottom-d.s.border.bottom-d.s.scrollbar.bottom-d.e.rect.bottom,left:d.e.rect.left-(d.s.rect.left+d.s.border.left),right:d.s.rect.right-d.s.border.right-d.s.scrollbar.right-d.e.rect.right},a={};r.direction.y===!0&&("start"==r.block?a.scrollTop=h.top:"end"==r.block?a.scrollTop=-h.bottom:h.top<0?a.scrollTop=d.s.scroll.top+h.top:h.top>0&&h.bottom<0&&(a.scrollTop=d.s.scroll.top+Math.min(h.top,-h.bottom))),r.direction.x===!0&&("start"==r.block?a.scrollLeft=h.left:"end"==r.block?a.scrollLeft=-h.right:h.left<0?a.scrollLeft=d.s.scroll.left+h.left:h.left>0&&h.right<0&&(a.scrollLeft=d.s.scroll.left+Math.min(h.left,-h.right))),t.isEmptyObject(a)?t.isFunction(r.complete)&&r.complete.call(s[0]):(l.test(s[0].nodeName)&&(s=t("html,body")),s.animate(a,r.duration).eq(0).queue(function(e){t.isFunction(r.complete)&&r.complete.call(s[0]),e()}))}return this}});var c={auto:!0,scroll:!0,visible:!1,hidden:!1};t.extend(t.expr[":"],{scrollable:function(t,o,r){var i=e["string"==typeof r[3]&&r[3].toLowerCase()]||e.both,n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle,s={x:c[n.overflowX.toLowerCase()]||!1,y:c[n.overflowY.toLowerCase()]||!1,isRoot:l.test(t.nodeName)};if(!s.x&&!s.y&&!s.isRoot)return!1;var d={height:{scroll:t.scrollHeight,client:t.clientHeight},width:{scroll:t.scrollWidth,client:t.clientWidth},scrollableX:function(){return(s.x||s.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(s.y||s.isRoot)&&this.height.scroll>this.height.client}};return i.y&&d.scrollableY()||i.x&&d.scrollableX()}})}(jQuery); From 4b75cdbb439a56d123f93166bc9a494e6f860147 Mon Sep 17 00:00:00 2001 From: Pavel Kulbakin Date: Mon, 12 Oct 2015 11:12:54 +0300 Subject: [PATCH 2/2] upd: [...] 1. fix newly introduced 'block' parameter 2. introcude 'delta' parameter 3. update minified version --- README.markdown | 1 + jquery.scrollintoview.js | 25 +++++++++++++++++++++---- jquery.scrollintoview.min.js | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index a876e52..72bdf93 100644 --- a/README.markdown +++ b/README.markdown @@ -13,6 +13,7 @@ $("some_selector").scrollintoview(); And that's it really. This is of course if we use defaults. It also supports some configuration possibilities that should be provided as an `options` object along with the call: * **block** (default: null) - alignment of the destination element relative to the viewport (start, end) +* **delta** (default: 0) - static gap to be used when scrolling * **duration** (default: "fast") - specified the same as with jQuery animate function; it can be provided as a string (slow, normal, fast) or a number of milliseconds that specifies animation duration * **direction** (default: "both") - scrolling can be performed in three different directions: * **x** or **horizontal** diff --git a/jquery.scrollintoview.js b/jquery.scrollintoview.js index 7850351..b42e5c1 100644 --- a/jquery.scrollintoview.js +++ b/jquery.scrollintoview.js @@ -20,6 +20,7 @@ var settings = { block: null, // "start" | "end" + delta: 0, duration: "fast", direction: "both" }; @@ -76,6 +77,7 @@ /// Scrolls the first element in the set into view by scrolling its closest scrollable parent. /// Additional options that can configure scrolling: /// block (default: null) - alignment destination element realative to the view port ("start" or "end") + /// delta (default: 0) - static addition to scrolling /// duration (default: "fast") - jQuery animation speed (can be a duration string or number of milliseconds) /// direction (default: "both") - select possible scrollings ("vertical" or "y", "horizontal" or "x", "both") /// complete (default: none) - a function to call when scrolling completes (called in context of the DOM element being scrolled) @@ -84,6 +86,17 @@ options = $.extend({}, settings, options); options.direction = converter[typeof (options.direction) === "string" && options.direction.toLowerCase()] || converter.both; + if (typeof (options.delta) === "object") { + $.extend(options.delta, { + x: settings.delta, + y: settings.delta + }); + } else { + options.delta = { + x: options.delta, + y: options.delta + }; + } var dirStr = ""; if (options.direction.x === true) dirStr = "horizontal"; @@ -115,10 +128,10 @@ if (options.direction.y === true) { if ('start' == options.block) { - animOptions.scrollTop = rel.top; + animOptions.scrollTop = dim.s.scroll.top + rel.top; } else if ('end' == options.block) { - animOptions.scrollTop = -rel.bottom; + animOptions.scrollTop = dim.s.scroll.top + Math.min(rel.top, -rel.bottom); } else if (rel.top < 0) { @@ -128,16 +141,18 @@ { animOptions.scrollTop = dim.s.scroll.top + Math.min(rel.top, -rel.bottom); } + + if (undefined !== animOptions.scrollTop) animOptions.scrollTop += options.delta.y; } // horizontal scroll if (options.direction.x === true) { if ('start' == options.block) { - animOptions.scrollLeft = rel.left; + animOptions.scrollLeft = dim.s.scroll.left + rel.left; } else if ('end' == options.block) { - animOptions.scrollLeft = -rel.right; + animOptions.scrollLeft = dim.s.scroll.left + Math.min(rel.left, -rel.right); } else if (rel.left < 0) { @@ -147,6 +162,8 @@ { animOptions.scrollLeft = dim.s.scroll.left + Math.min(rel.left, -rel.right); } + + if (undefined !== animOptions.scrollLeft) animOptions.scrollLeft += options.delta.x; } // scroll if needed diff --git a/jquery.scrollintoview.min.js b/jquery.scrollintoview.min.js index e61ce0c..90acf37 100644 --- a/jquery.scrollintoview.min.js +++ b/jquery.scrollintoview.min.js @@ -8,4 +8,4 @@ * Licensed under the terms of the MIT license * http://www.opensource.org/licenses/mit-license.php */ -!function(t){var e={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},o={block:null,duration:"fast",direction:"both"},l=/^(?:html)$/i,r=function(e,o){o=o||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle);var l=document.defaultView&&document.defaultView.getComputedStyle?!0:!1,r={top:parseFloat(l?o.borderTopWidth:t.css(e,"borderTopWidth"))||0,left:parseFloat(l?o.borderLeftWidth:t.css(e,"borderLeftWidth"))||0,bottom:parseFloat(l?o.borderBottomWidth:t.css(e,"borderBottomWidth"))||0,right:parseFloat(l?o.borderRightWidth:t.css(e,"borderRightWidth"))||0};return{top:r.top,left:r.left,bottom:r.bottom,right:r.right,vertical:r.top+r.bottom,horizontal:r.left+r.right}},i=function(e){var o=t(window),i=l.test(e[0].nodeName);return{border:i?{top:0,left:0,bottom:0,right:0}:r(e[0]),scroll:{top:(i?o:e).scrollTop(),left:(i?o:e).scrollLeft()},scrollbar:{right:i?0:e.innerWidth()-e[0].clientWidth,bottom:i?0:e.innerHeight()-e[0].clientHeight},rect:function(){var t=e[0].getBoundingClientRect();return{top:i?0:t.top,left:i?0:t.left,bottom:i?e[0].clientHeight:t.bottom,right:i?e[0].clientWidth:t.right}}()}};t.fn.extend({scrollintoview:function(r){r=t.extend({},o,r),r.direction=e["string"==typeof r.direction&&r.direction.toLowerCase()]||e.both;var c="";r.direction.x===!0&&(c="horizontal"),r.direction.y===!0&&(c=c?"both":"vertical");var n=this.eq(0),s=n.closest(":scrollable("+c+")");if(s.length>0){s=s.eq(0);var d={e:i(n),s:i(s)},h={top:d.e.rect.top-(d.s.rect.top+d.s.border.top),bottom:d.s.rect.bottom-d.s.border.bottom-d.s.scrollbar.bottom-d.e.rect.bottom,left:d.e.rect.left-(d.s.rect.left+d.s.border.left),right:d.s.rect.right-d.s.border.right-d.s.scrollbar.right-d.e.rect.right},a={};r.direction.y===!0&&("start"==r.block?a.scrollTop=h.top:"end"==r.block?a.scrollTop=-h.bottom:h.top<0?a.scrollTop=d.s.scroll.top+h.top:h.top>0&&h.bottom<0&&(a.scrollTop=d.s.scroll.top+Math.min(h.top,-h.bottom))),r.direction.x===!0&&("start"==r.block?a.scrollLeft=h.left:"end"==r.block?a.scrollLeft=-h.right:h.left<0?a.scrollLeft=d.s.scroll.left+h.left:h.left>0&&h.right<0&&(a.scrollLeft=d.s.scroll.left+Math.min(h.left,-h.right))),t.isEmptyObject(a)?t.isFunction(r.complete)&&r.complete.call(s[0]):(l.test(s[0].nodeName)&&(s=t("html,body")),s.animate(a,r.duration).eq(0).queue(function(e){t.isFunction(r.complete)&&r.complete.call(s[0]),e()}))}return this}});var c={auto:!0,scroll:!0,visible:!1,hidden:!1};t.extend(t.expr[":"],{scrollable:function(t,o,r){var i=e["string"==typeof r[3]&&r[3].toLowerCase()]||e.both,n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle,s={x:c[n.overflowX.toLowerCase()]||!1,y:c[n.overflowY.toLowerCase()]||!1,isRoot:l.test(t.nodeName)};if(!s.x&&!s.y&&!s.isRoot)return!1;var d={height:{scroll:t.scrollHeight,client:t.clientHeight},width:{scroll:t.scrollWidth,client:t.clientWidth},scrollableX:function(){return(s.x||s.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(s.y||s.isRoot)&&this.height.scroll>this.height.client}};return i.y&&d.scrollableY()||i.x&&d.scrollableX()}})}(jQuery); +!function(t){var e={vertical:{x:!1,y:!0},horizontal:{x:!0,y:!1},both:{x:!0,y:!0},x:{x:!0,y:!1},y:{x:!1,y:!0}},o={block:null,delta:0,duration:"fast",direction:"both"},l=/^(?:html)$/i,r=function(e,o){o=o||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e,null):e.currentStyle);var l=document.defaultView&&document.defaultView.getComputedStyle?!0:!1,r={top:parseFloat(l?o.borderTopWidth:t.css(e,"borderTopWidth"))||0,left:parseFloat(l?o.borderLeftWidth:t.css(e,"borderLeftWidth"))||0,bottom:parseFloat(l?o.borderBottomWidth:t.css(e,"borderBottomWidth"))||0,right:parseFloat(l?o.borderRightWidth:t.css(e,"borderRightWidth"))||0};return{top:r.top,left:r.left,bottom:r.bottom,right:r.right,vertical:r.top+r.bottom,horizontal:r.left+r.right}},i=function(e){var o=t(window),i=l.test(e[0].nodeName);return{border:i?{top:0,left:0,bottom:0,right:0}:r(e[0]),scroll:{top:(i?o:e).scrollTop(),left:(i?o:e).scrollLeft()},scrollbar:{right:i?0:e.innerWidth()-e[0].clientWidth,bottom:i?0:e.innerHeight()-e[0].clientHeight},rect:function(){var t=e[0].getBoundingClientRect();return{top:i?0:t.top,left:i?0:t.left,bottom:i?e[0].clientHeight:t.bottom,right:i?e[0].clientWidth:t.right}}()}};t.fn.extend({scrollintoview:function(r){r=t.extend({},o,r),r.direction=e["string"==typeof r.direction&&r.direction.toLowerCase()]||e.both,"object"==typeof r.delta?t.extend(r.delta,{x:o.delta,y:o.delta}):r.delta={x:r.delta,y:r.delta};var c="";r.direction.x===!0&&(c="horizontal"),r.direction.y===!0&&(c=c?"both":"vertical");var s=this.eq(0),n=s.closest(":scrollable("+c+")");if(n.length>0){n=n.eq(0);var d={e:i(s),s:i(n)},a={top:d.e.rect.top-(d.s.rect.top+d.s.border.top),bottom:d.s.rect.bottom-d.s.border.bottom-d.s.scrollbar.bottom-d.e.rect.bottom,left:d.e.rect.left-(d.s.rect.left+d.s.border.left),right:d.s.rect.right-d.s.border.right-d.s.scrollbar.right-d.e.rect.right},h={};r.direction.y===!0&&("start"==r.block?h.scrollTop=d.s.scroll.top+a.top:"end"==r.block?h.scrollTop=d.s.scroll.top+Math.min(a.top,-a.bottom):a.top<0?h.scrollTop=d.s.scroll.top+a.top:a.top>0&&a.bottom<0&&(h.scrollTop=d.s.scroll.top+Math.min(a.top,-a.bottom)),void 0!==h.scrollTop&&(h.scrollTop+=r.delta.y)),r.direction.x===!0&&("start"==r.block?h.scrollLeft=d.s.scroll.left+a.left:"end"==r.block?h.scrollLeft=d.s.scroll.left+Math.min(a.left,-a.right):a.left<0?h.scrollLeft=d.s.scroll.left+a.left:a.left>0&&a.right<0&&(h.scrollLeft=d.s.scroll.left+Math.min(a.left,-a.right)),void 0!==h.scrollLeft&&(h.scrollLeft+=r.delta.x)),t.isEmptyObject(h)?t.isFunction(r.complete)&&r.complete.call(n[0]):(l.test(n[0].nodeName)&&(n=t("html,body")),n.animate(h,r.duration).eq(0).queue(function(e){t.isFunction(r.complete)&&r.complete.call(n[0]),e()}))}return this}});var c={auto:!0,scroll:!0,visible:!1,hidden:!1};t.extend(t.expr[":"],{scrollable:function(t,o,r,i){var s=e["string"==typeof r[3]&&r[3].toLowerCase()]||e.both,n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle,d={x:c[n.overflowX.toLowerCase()]||!1,y:c[n.overflowY.toLowerCase()]||!1,isRoot:l.test(t.nodeName)};if(!d.x&&!d.y&&!d.isRoot)return!1;var a={height:{scroll:t.scrollHeight,client:t.clientHeight},width:{scroll:t.scrollWidth,client:t.clientWidth},scrollableX:function(){return(d.x||d.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(d.y||d.isRoot)&&this.height.scroll>this.height.client}};return s.y&&a.scrollableY()||s.x&&a.scrollableX()}})}(jQuery); \ No newline at end of file