diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-10 14:32:25 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-10 14:32:25 +0000 |
commit | ffa5f16169f62deaa984fecb2c52f3e9528b95cf (patch) | |
tree | 671f20f06fa894d34fca9a7c99c9f53c81e32efb | |
parent | 3206b611b128075b73e29086586a4ff372817089 (diff) | |
download | jquery-ui-ffa5f16169f62deaa984fecb2c52f3e9528b95cf.tar.gz jquery-ui-ffa5f16169f62deaa984fecb2c52f3e9528b95cf.zip |
implemented $.fn.scrollParent (candidate for jQuery core, see ticket #3589 in Jquery's trac)
-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); } }); |