Sha256: ddb1b9330a40c706a1f7729f0449c63d196474cdfd40bfbcadfb7fb3c3c988ad

Contents?: true

Size: 1.28 KB

Versions: 11

Compression:

Stored size: 1.28 KB

Contents

//= require jquery-ui/version

/*!
 * jQuery UI Scroll Parent 1.13.0
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */

//>>label: scrollParent
//>>group: Core
//>>description: Get the closest ancestor element that is scrollable.
//>>docs: http://api.jqueryui.com/scrollParent/

( function( factory ) {
	"use strict";

	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "jquery", "./version" ], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
} )( function( $ ) {
"use strict";

return $.fn.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;
};

} );

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
alchemy_cms-7.0.15 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.14 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.13 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.12 vendor/assets/javascripts/jquery-ui/scroll-parent.js
jquery-ui-rails-7.0.0 app/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.11 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.10 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.9 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.8 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.7 vendor/assets/javascripts/jquery-ui/scroll-parent.js
alchemy_cms-7.0.6 vendor/assets/javascripts/jquery-ui/scroll-parent.js