Skip to content

Commit ffa5f16

Browse files
author
Paul Bakaus
committed
implemented $.fn.scrollParent (candidate for jQuery core, see ticket #3589 in Jquery's trac)
1 parent 3206b61 commit ffa5f16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ui/ui.core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ $.fn.extend({
169169
.attr('unselectable', 'on')
170170
.css('MozUserSelect', 'none')
171171
.bind('selectstart.ui', function() { return false; });
172+
},
173+
174+
scrollParent: function() {
175+
return $(this).parents().filter(function() {
176+
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
177+
}).eq(0);
172178
}
173179

174180
});

0 commit comments

Comments
 (0)