diff options
-rw-r--r-- | ui/ui.core.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 1059b0ec4..ad12ef48b 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -169,6 +169,12 @@ $.fn.extend({ .attr('unselectable', 'on') .css('MozUserSelect', 'none') .bind('selectstart.ui', function() { return false; }); + }, + + scrollParent: function() { + return $(this).parents().filter(function() { + return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); } }); |