⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jquery-1.2.6-intellisense.js

📁 上传裁减图片java做的图像处理
💻 JS
📖 第 1 页 / 共 5 页
字号:
		if (this.nodeType == 1)			this.removeAttribute( name );	},	addClass: function( classNames ) {		///<summary>Adds the specified class(es) to each of the set of matched elements.  Note: intellisense not working</summary>		///<param name="className">One or more CSS classes to add to the elements, these are separated by spaces.</param>		///<returns type="jQuery" />				jQuery.className.add( this, classNames );	},	removeClass: function( classNames ) {		///<summary>Removes all or the specified class(es) from the set of matched elements.  Note: intellisense not working</summary>		///<param name="className">One or more CSS classes to remove from the elements, these are separated by spaces.</param>		///<returns type="jQuery" />				jQuery.className.remove( this, classNames );	},	toggleClass: function( classNames ) {		///<summary>Adds the specified class if it is not present, removes the specified class if it is present.  Note: intellisense not working</summary>		///<param name="className">A CSS class to toggle on the elements.</param>		///<returns type="jQuery" />				jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );	},	remove: function( selector ) {		///<summary>Removes all matched elements from the DOM. Note: Intellisense not working.</summary>		///<param name="selector" optional="true">(optional) A jQuery expression to filter the set of elements to be removed.</param>		///<returns type="jQuery" />				if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {			// Prevent memory leaks			jQuery( "*", this ).add(this).each(function(){				jQuery.event.remove(this);				jQuery.removeData(this);			});			if (this.parentNode)				this.parentNode.removeChild( this );		}	},	empty: function() {		///<summary>Remove all child nodes from the set of matched elements. Note: Intellisense not working.</summary>		///<returns type="jQuery" />				// Remove element nodes and prevent memory leaks		jQuery( ">*", this ).remove();		// Remove any remaining nodes		while ( this.firstChild )			this.removeChild( this.firstChild );	}}, function(name, fn){	jQuery.fn[ name ] = function(){		///<summary>A number of API functions share this function body: 		/// 1. removeAttr(name) - Remove an attribute from each of the matched elements.		/// 2. addClass(className) - Adds the specified class(es) to each of the set of matched elements.		/// 3. removeClass(className) - Removes all or the specified class(es) from the set of matched elements.		/// 4. toggleClass(className) - Adds the specified class if it is not present, removes the specified class if it is present.		/// 5. remove([optional] selector) - Removes all matched elements from the DOM.		/// 6. empty() - Remove all child nodes from the set of matched elements.		///</summary>		///<param name="type" type="String"> note: intellisense does not show parameters for this method		/// 1. removeAttr(name) - The name of the property to remove.		/// 2. addClass(className) - One or more CSS classes to add to the elements, these are separated by spaces.		/// 3. removeClass(className) - One or more CSS classes to remove from the elements, these are separated by spaces.		/// 4. toggleClass(className) - A CSS class to toggle on the elements.		/// 5. remove(selector) - (optional) A jQuery expression to filter the set of elements to be removed.		/// 6. empty()		///</param>		///<returns type="jQuery" />		return this.each( fn, arguments );	};});jQuery.each([ "Height", "Width" ], function(i, name){	var type = name.toLowerCase();	jQuery.fn[ type ] = function( size ) {	    ///<summary>Returns the Height or Width	    ///  1. Height() - Get the current computed, pixel, height of the first matched element.	    ///  2. Height(val) - Set the CSS height of every matched element.	    ///  1. Width() - Get the current computed, pixel, width of the first matched element.	    ///  2. Width(val) - Set the CSS width of every matched element.	    ///</summary>		///<param name="size" optional="true">(optional) Set the CSS property to the specified value.</param>	    ///<returns type="jQuery" />		// Get window width or height		return this[0] == window ?			// Opera reports document.body.client[Width/Height] properly in both quirks and standards			jQuery.browser.opera && document.body[ "client" + name ] ||			// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)			jQuery.browser.safari && window[ "inner" + name ] ||			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode			document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :			// Get document width or height			this[0] == document ?				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater				Math.max(					Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),					Math.max(document.body["offset" + name], document.documentElement["offset" + name])				) :				// Get or set width or height on the element				size == undefined ?					// Get width or height on the element					(this.length ? jQuery.css( this[0], type ) : null) :					// Set the width or height on the element (default to pixels if value is unitless)					this.css( type, size.constructor == String ? size : size + "px" );	};});// Helper function used by the dimensions and offset modulesfunction num(elem, prop) {	return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;}var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?		"(?:[\\w*_-]|\\\\.)" :		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",	quickChild = new RegExp("^>\\s*(" + chars + "+)"),	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),	quickClass = new RegExp("^([#.]?)(" + chars + "*)");jQuery.extend({	expr: {		"": function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},		"#": function(a,i,m){return a.getAttribute("id")==m[2];},		":": {			// Position Checks			lt: function(a,i,m){return i<m[3]-0;},			gt: function(a,i,m){return i>m[3]-0;},			nth: function(a,i,m){return m[3]-0==i;},			eq: function(a,i,m){return m[3]-0==i;},			first: function(a,i){return i==0;},			last: function(a,i,m,r){return i==r.length-1;},			even: function(a,i){return i%2==0;},			odd: function(a,i){return i%2;},			// Child Checks			"first-child": function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},			"last-child": function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},			"only-child": function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},			// Parent Checks			parent: function(a){return a.firstChild;},			empty: function(a){return !a.firstChild;},			// Text Check			contains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},			// Visibility			visible: function(a){return "hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},			hidden: function(a){return "hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},			// Form attributes			enabled: function(a){return !a.disabled;},			disabled: function(a){return a.disabled;},			checked: function(a){return a.checked;},			selected: function(a){return a.selected||jQuery.attr(a,"selected");},			// Form elements			text: function(a){return "text"==a.type;},			radio: function(a){return "radio"==a.type;},			checkbox: function(a){return "checkbox"==a.type;},			file: function(a){return "file"==a.type;},			password: function(a){return "password"==a.type;},			submit: function(a){return "submit"==a.type;},			image: function(a){return "image"==a.type;},			reset: function(a){return "reset"==a.type;},			button: function(a){return "button"==a.type||jQuery.nodeName(a,"button");},			input: function(a){return /input|select|textarea|button/i.test(a.nodeName);},			// :has()			has: function(a,i,m){return jQuery.find(m[3],a).length;},			// :header			header: function(a){return /h\d/i.test(a.nodeName);},			// :animated			animated: function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}		}	},	// The regular expressions that power the parsing engine	parse: [		// Match: [@value='test'], [@foo]		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,		// Match: :contains('foo')		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,		// Match: :even, :last-child, #id, .class		new RegExp("^([:.#]*)(" + chars + "+)")	],	multiFilter: function( expr, elems, not ) {		var old, cur = [];		while ( expr && expr != old ) {			old = expr;			var f = jQuery.filter( expr, elems, not );			expr = f.t.replace(/^\s*,\s*/, "" );			cur = not ? elems = f.r : jQuery.merge( cur, f.r );		}		return cur;	},	find: function( t, context ) {		// Quickly handle non-string expressions		if ( typeof t != "string" )			return [ t ];		// check to make sure context is a DOM element or a document		if ( context && context.nodeType != 1 && context.nodeType != 9)			return [ ];		// Set the correct context (if none is provided)		context = context || document;		// Initialize the search		var ret = [context], done = [], last, nodeName;		// Continue while a selector expression exists, and while		// we're no longer looping upon ourselves		while ( t && last != t ) {			var r = [];			last = t;			t = jQuery.trim(t);			var foundToken = false,			// An attempt at speeding up child selectors that			// point to a specific element tag				re = quickChild,				m = re.exec(t);			if ( m ) {				nodeName = m[1].toUpperCase();				// Perform our own iteration and filter				for ( var i = 0; ret[i]; i++ )					for ( var c = ret[i].firstChild; c; c = c.nextSibling )						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )							r.push( c );				ret = r;				t = t.replace( re, "" );				if ( t.indexOf(" ") == 0 ) continue;				foundToken = true;			} else {				re = /^([>+~])\s*(\w*)/i;				if ( (m = re.exec(t)) != null ) {					r = [];					var merge = {};					nodeName = m[2].toUpperCase();					m = m[1];					for ( var j = 0, rl = ret.length; j < rl; j++ ) {						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;						for ( ; n; n = n.nextSibling )							if ( n.nodeType == 1 ) {								var id = jQuery.data(n);								if ( m == "~" && merge[id] ) break;								if (!nodeName || n.nodeName.toUpperCase() == nodeName ) {									if ( m == "~" ) merge[id] = true;									r.push( n );								}								if ( m == "+" ) break;							}					}					ret = r;					// And remove the token					t = jQuery.trim( t.replace( re, "" ) );					foundToken = true;				}			}			// See if there's still an expression, and that we haven't already			// matched a token			if ( t && !foundToken ) {				// Handle multiple expressions				if ( !t.indexOf(",") ) {					// Clean the result set					if ( context == ret[0] ) ret.shift();					// Merge the result sets					done = jQuery.merge( done, ret );					// Reset the context					r = ret = [context];					// Touch up the selector string					t = " " + t.substr(1,t.length);				} else {					// Optimize for the case nodeName#idName					var re2 = quickID;					var m = re2.exec(t);					// Re-organize the results, so that they're consistent					if ( m ) {						m = [ 0, m[2], m[3], m[1] ];					} else {						// Otherwise, do a traditional filter check for						// ID, class, and element selectors						re2 = quickClass;						m = re2.exec(t);					}					m[2] = m[2].replace(/\\/g, "");					var elem = ret[ret.length-1];					// Try to do a global search by ID, where we can					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {						// Optimization for HTML document case						var oid = elem.getElementById(m[2]);						// Do a quick check for the existence of the actual ID attribute						// to avoid selecting by the name attribute in IE						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];						// Do a quick check for node name (where applicable) so						// that div#foo searches will be really fast						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];					} else {						// We need to find all descendant elements						for ( var i = 0; ret[i]; i++ ) {							// Grab the tag name being searched for							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];							// Handle IE7 being really dumb about <object>s							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )								tag = "param";							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));						}						// It's faster to filter by class and be done with it						if ( m[1] == "." )							r = jQuery.classFilter( r, m[2] );						// Same with ID filtering						if ( m[1] == "#" ) {							var tmp = [];							// Try to find the element with the ID							for ( var i = 0; r[i]; i++ )								if ( r[i].getAttribute("id") == m[2] ) {									tmp = [ r[i] ];									break;								}							r = tmp;						}						ret = r;					}					t = t.replace( re2, "" );				}			}			// If a selector string still exists			if ( t ) {				// Attem

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -