Sha256: 05b2492ec3ec8f44c95438773abed02aa5b34e019b1ec1660b9a602c9752d827

Contents?: true

Size: 1.26 KB

Versions: 20

Compression:

Stored size: 1.26 KB

Contents

//= require rails_admin/jquery-ui/version

/*!
 * jQuery UI Scroll Parent 1.12.1
 * 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 ) {
	if ( typeof define === "function" && define.amd ) {

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

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

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

20 entries across 20 versions & 1 rubygems

Version Path
rails_admin-3.3.0 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.2.1 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.2.0 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.2.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.2.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.4 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.3 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.2 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.1 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.0 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.0.rc2 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.1.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.rc4 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.rc3 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.rc2 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.rc vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.beta2 vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js
rails_admin-3.0.0.beta vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js