aboutsummaryrefslogtreecommitdiffstats
path: root/ui/core.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-07-15 20:23:44 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-08-08 00:29:37 -0400
commit72bfafbedea4973b803abeefc97637f246b11c89 (patch)
tree501addde9d778f56695ce48b405e97f86dd72cdc /ui/core.js
parent6064a5e0487428d53bd694dcebce952730992c46 (diff)
downloadjquery-ui-72bfafbedea4973b803abeefc97637f246b11c89.tar.gz
jquery-ui-72bfafbedea4973b803abeefc97637f246b11c89.zip
Core: Move scrollParent into its own module
Ref #9647
Diffstat (limited to 'ui/core.js')
-rw-r--r--ui/core.js15
1 files changed, 1 insertions, 14 deletions
diff --git a/ui/core.js b/ui/core.js
index d443346e8..b77338720 100644
--- a/ui/core.js
+++ b/ui/core.js
@@ -32,6 +32,7 @@
"./safe-active-element",
"./safe-blur",
"./tabbable",
+ "./scroll-parent",
"./version"
], factory );
} else {
@@ -43,20 +44,6 @@
// plugins
$.fn.extend( {
- scrollParent: function( includeHidden ) {
- var position = this.css( "position" ),
- excludeStaticParent = position === "absolute",
- overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
- scrollParent = this.parents().filter( function() {
- var parent = $( this );
- if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
- return false;
- }
- return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
- } ).eq( 0 );
-
- return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
- },
uniqueId: ( function() {
var uuid = 0;