All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.selector.contains.js Maven / Gradle / Ivy

The newest version!
define( [
	"../core"
], function( jQuery ) {

"use strict";

// Note: an element does not contain itself
jQuery.contains = function( a, b ) {
	var bup = b && b.parentNode;

	return a === bup || !!( bup && bup.nodeType === 1 && (

		// Support: IE 9 - 11+
		// IE doesn't have `contains` on SVG.
		a.contains ?
			a.contains( bup ) :
			a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
	) );
};

} );




© 2015 - 2024 Weber Informatics LLC | Privacy Policy