From ffa5f16169f62deaa984fecb2c52f3e9528b95cf Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 10 Nov 2008 14:32:25 +0000 Subject: [PATCH] implemented $.fn.scrollParent (candidate for jQuery core, see ticket #3589 in Jquery's trac) --- ui/ui.core.js | 6 ++++++ 1 file changed, 6 insertions(+) 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); } });