jquery.js ( File view )

  • By qmly1990 2015-02-02
  • View(s):128
  • Download(s):11
  • Point(s): 2
			/*!
 * jQuery JavaScript Library v1.9.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2013-2-4
 */
(function( window, undefined ) {


// Can't do this because several apps including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//"use strict";
var
	// The deferred used on DOM ready
	readyList,

	// A central reference to the root jQuery(document)
	rootjQuery,

	// Support: IE<9
	// For `typeof node.method` instead of `node.method !== undefined`
	core_strundefined = typeof undefined,

	// Use the correct document accordingly with window argument (sandbox)
	document = window.document,
	location = window.location,

	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,

	// Map over the $ in case of overwrite
	_$ = window.$,

	// [[Class]] -> type pairs
	class2type = {

},

	// List of deleted data cache ids, so we can reuse them
	core_deletedIds = [],

	core_version = "1.9.1",

	// Save a reference to some core methods
	core_concat = core_deletedIds.concat,
	core_push = core_deletedIds.push,
	core_slice = core_deletedIds.slice,
	core_indexOf = core_deletedIds.indexOf,
	core_toString = class2type.toString,
	core_hasOwn = class2type.hasOwnProperty,
	core_trim = core_version.trim,

	// Define a local copy of jQuery
	jQuery = function( selector, context ) {

		// The jQuery object is actually just the init constructor 'enhanced'
		return new jQuery.fn.init( selector, context, rootjQuery );
	
},

	// Used for matching numbers
	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,

	// Used for splitting on whitespace
	core_rnotwhite = /\S+/g,

	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

	// A simple way to check for HTML strings
	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
	// Strict HTML recognition (#11290: must start with <)
	rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,

	// Match a standalone tag
	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,

	// JSON RegExp
	rvalidchars = /^[\],:{

}\s]*$/,
	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{
4
})/g,
	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,

	// Matches dashed string for camelizing
	rmsPrefix = /^-ms-/,
	rdashAlpha = /-([\da-z])/gi,

	// Used by jQuery.camelCase as callback to replace()
	fcamelCase = function( all, letter ) {

		return letter.toUpperCase();
	
},

	// The ready event handler
	completed = function( event ) {


		// readyState === "complete" is good enough for us to call the dom ready in oldIE
		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {

			detach();
			jQuery.ready();
		
}
	
},
	// Clean-up method for dom ready events
	detach = function() {

		if ( document.addEventListener ) {

			document.removeEventListener( "DOMContentLoaded", completed, false );
			window.removeEventListener( "load", completed, false );

		
} else {

			document.detachEvent( "onreadystatechange", completed );
			window.detachEvent( "onload", completed );
		
}
	
};

jQuery.fn = jQuery.prototype = {

	// The current version of jQuery being used
	jquery: core_version,

	constructor: jQuery,
	init: function( selector, context, rootjQuery ) {

		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {

			return this;
		
}

		// Handle HTML strings
		if ( typeof selector === "string" ) {

			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {

				// Assume that strings that start and end with <> are HTML and skip the regex check
				match = [ null, selector, null ];

			
} else {

				match = rquickExpr.exec( selector );
			
}

			// Match html or make sure no context is specified for #id
			if ( match && (match[1] || !context) ) {


				// HANDLE: $(html) -> $(array)
				if ( match[1] ) {

					context = context instanceof jQuery ? context[0] : context;

					// scripts is true for back-compat
					jQuery.merge( this, jQuery.parseHTML(
						match[1],
						context && context.nodeType ? context.ownerDocument || context : document,
						true
					) );

					// HANDLE: $(html, props)
					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {

						for ( match in context ) {

							// Properties of context are called as methods if possible
							if ( jQuery.isFunction( this[ match ] ) ) {

								this[ match ]( context[ match ] );

							// ...and otherwise set as attributes
							
} else {

								this.attr( match, context[ match ] );
							
}
						
}
					
}

					return this;

				// HANDLE: $(#id)
				
} else {

					elem = document.getElementById( match[2] );

					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document #6963
					if ( elem && elem.parentNode ) {

						// Handle the case where IE and Opera return items
						// by name instead of ID
						if ( elem.id !== match[2] ) {

							return rootjQuery.find( selector );
						
}

						// Otherwise, we inject the element directly into the jQuery object
						this.length = 1;
						this[0] = elem;
					
}

					this.context = document;
					this.selector = selector;
					return this;
				
}

			// HANDLE: $(expr, $(...))
			
} else if ( !context || context.jquery ) {

				return ( context || rootjQuery ).find( selector );

			// HANDLE: $(expr, context)
			// (which is just equivalent to: $(context).find(expr)
			
} else {

				return this.constructor( context ).find( selector );
			
}

		// HANDLE: $(DOMElement)
		
} else if ( selector.nodeType ) {

			this.context = this[0] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		
} else if ( jQuery.isFunction( selector ) ) {

			return rootjQuery.ready( selector );
		
}

		if ( selector.selector !== undefined ) {

			this.selector = selector.selector;
			this.context = selector.context;
		
}

		return jQuery.makeArray( selector, this );
	
},

	// Start with an empty selector
	selector: "",

	// The default length of a jQuery object is 0
	length: 0,

	// The number of elements contained in the matched element set
	size: function() {

		return this.length;
	
},

	toArray: function() {

		return core_slice.call( this );
	
},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {

		return num == null ?

			// Return a 'clean' array
			this.toArray() :

			// Return just the object
			( num < 0 ? this[ this.length + num ] : this[ num ] );
	
},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems ) {


		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;
		ret.context = this.context;

		// Return the newly-formed element set
		return ret;
	
},

	// Execute a callback for every element in the matched set.
	// (You can seed the arguments with an array of args, but this is
	// only used internally.)
	each: function( callback, args ) {

		return jQuery.each( this, callback, args );
	
},

	ready: function( fn ) {

		// Add the callback
		jQuery.ready.promise().done( fn );

		return this;
	
},

	slice: function() {

		return this.pushStack( core_slice.apply( this, arguments ) );
	
},

	first: function() {

		return this.eq( 0 );
	
},

	last: function() {

		return this.eq( -1 );
	
},

	eq: function( i ) {

		var len = this.length,
			j = +i + ( i < 0 ? len : 0 );
		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
	
},

	map: function( callback ) {

		return this.pushStack( jQuery.map(this, function( elem, i ) {

			return callback.call( elem, i, elem );
		
}));
	
},

	end: function() {

		return this.prevObject || this.constructor(null);
	
},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: core_push,
	sort: [].sort,
	splice: [].splice

};

// Give the init function the jQuery prototype for later instantiation
jQuery.fn.init.prototype = jQuery.fn;

jQuery.extend = jQuery.fn.extend = function() {

	var src, copyIsArray, copy, name, options, clone,
		target = arguments[0] || {

},
		i = 1,
		length = arguments.length,
		deep = false;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {

		deep = target;
		target = arguments[1] || {

};
		// skip the boolean and the target
		i = 2;
	
}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {

		target = {

};
	
}

	// extend jQuery itself if only one argument is passed
	if ( length === i ) {

		target = this;
		--i;
	
}

	for ( ; i < length; i++ ) {

		// Only deal with non-null/undefined values
		if ( (options = arguments[ i ]) != null ) {

			// Extend the base object
			for ( name in options ) {

				src = target[ name ];
				copy = options[ name ];

				// Prevent never-ending loop
				if ( target === copy ) {

					continue;
				
}

				// Recurse if we're merging plain objects or arrays
				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {

					if ( copyIsArray ) {

						copyIsArray = false;
						clone = src && jQuery.isArray(src) ? src : [];

					
} else {

						clone = src && jQuery.isPlainObject(src) ? src : {

};
					
}

					// Never move original objects, clone them
					target[ name ] = jQuery.extend( deep, clone, copy );

				// Don't bring in undefined values
				
} else if ( copy !== undefined ) {

					target[ name ] = copy;
				
}
			
}
		
}
	
}

	// Return the modified object
	return target;

};

jQuery.extend({

	noConflict: function( deep ) {

		if ( window.$ === jQuery ) {

			window.$ = _$;
		
}

		if ( deep && window.jQuery === jQuery ) {

			window.jQuery = _jQuery;
		
}

		return jQuery;
	
},

	// Is the DOM read
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 2

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
.classpath536.00 B01-11-14|00:13
.project839.00 B23-05-14|21:08
org.eclipse.jdt.core.prefs177.00 B30-12-14|21:47
AndroidManifest.xml2.01 kB23-05-14|21:22
cordova.js221.07 kB23-05-14|21:18
cool.jpg13.72 kB26-05-14|09:47
ajax-loader.gif7.64 kB26-05-14|14:55
icons-18-black.png1.92 kB26-05-14|14:55
icons-18-white.png1.94 kB26-05-14|14:55
icons-36-black.png3.77 kB26-05-14|14:55
icons-36-white.png3.77 kB26-05-14|14:55
jquery.mobile-1.4.2.min.css202.16 kB26-05-14|14:55
style.css391.00 B17-06-14|15:00
pict12.jpg10.58 kB08-06-14|22:06
pict13.jpg20.79 kB16-06-14|09:55
pict14.jpg12.38 kB08-06-14|19:03
pict15.jpg286.48 kB08-06-14|19:00
pict16.jpg32.52 kB09-06-14|18:27
pict17.jpg8.85 kB08-06-14|19:09
pict18.jpg269.81 kB09-06-14|18:27
pict20.jpg28.77 kB08-06-14|19:31
pict21.jpg52.07 kB08-06-14|18:03
pict22.jpg52.33 kB16-06-14|09:53
pict23.jpg8.00 kB08-06-14|19:17
pict24.jpg11.84 kB08-06-14|19:19
pict25.jpg62.54 kB16-06-14|09:49
picture11.jpg21.78 kB04-06-14|07:09
picture22.jpg25.38 kB04-06-14|08:48
picture33.jpg13.33 kB04-06-14|08:00
picture44.jpg42.66 kB04-06-14|07:52
wen1.jpg52.08 kB16-06-14|17:23
wen2.jpg41.47 kB16-06-14|17:23
wen3.jpg46.89 kB16-06-14|17:25
index.html11.86 kB05-01-15|20:46
jquery.js262.09 kB26-05-14|14:57
jquery.mobile-1.4.2.min.js191.07 kB26-05-14|14:55
picture1.jpg36.66 kB26-05-14|09:01
wen.html4.07 kB02-07-14|15:12
AndroidManifest.xml2.01 kB30-01-15|22:33
BuildConfig.class339.00 B30-01-15|22:33
MainActivity$PlaceholderFragment.class937.00 B30-01-15|22:51
MainActivity.class1.30 kB30-01-15|22:51
R$attr.class331.00 B30-01-15|22:33
R$dimen.class452.00 B30-01-15|22:33
R$drawable.class398.00 B30-01-15|22:33
R$id.class417.00 B30-01-15|22:33
R$layout.class431.00 B30-01-15|22:33
R$menu.class379.00 B30-01-15|22:33
R$string.class463.00 B30-01-15|22:33
R$style.class422.00 B30-01-15|22:33
R$xml.class378.00 B30-01-15|22:33
R.class684.00 B30-01-15|22:33
classes.dex1.37 MB30-01-15|21:51
android-support-v4-b4d352751c00a8d1e3112439689c68a0.jar228.93 kB01-11-14|00:19
android-support-v4-e08b0ca61a973ebd4bed06933aa1ec1a.jar228.93 kB30-12-14|21:52
cordova-2.9.0-8b0b13ea2e7e2bf16a7708965c5980c4.jar188.29 kB30-12-14|21:52
cordova-2.9.0-cd967ba9651573aaba4c41ce86f30091.jar188.29 kB01-11-14|00:19
god.apk1.79 MB30-01-15|21:51
jarlist.cache120.00 B30-01-15|22:33
ic_launcher.png4.33 kB30-12-14|21:52
ic_launcher.png2.27 kB30-12-14|21:52
ic_launcher.png6.71 kB30-12-14|21:52
ic_launcher.png12.85 kB30-12-14|21:52
ic_launcher.png4.33 kB01-11-14|00:19
ic_launcher.png2.27 kB01-11-14|00:19
ic_launcher.png6.71 kB01-11-14|00:19
ic_launcher.png12.85 kB01-11-14|00:19
resources.ap_1.38 MB14-01-15|20:00
BuildConfig.java157.00 B30-01-15|22:33
R.java2.74 kB30-01-15|22:33
ic_launcher-web.png49.21 kB23-05-14|21:08
android-support-v4.jar612.87 kB23-05-14|21:08
cordova-2.9.0.jar435.79 kB23-05-14|21:15
proguard-project.txt781.00 B23-05-14|21:08
project.properties609.00 B30-12-14|21:52
ic_launcher.png4.25 kB23-05-14|21:08
ic_launcher.png2.19 kB23-05-14|21:08
ic_launcher.png6.81 kB23-05-14|21:08
ic_launcher.png13.99 kB23-05-14|21:08
activity_main.xml331.00 B23-05-14|21:08
fragment_main.xml701.00 B23-05-14|21:08
main.xml384.00 B01-11-14|00:18
dimens.xml220.00 B23-05-14|21:08
strings.xml220.00 B23-05-14|21:08
styles.xml697.00 B01-11-14|00:15
styles.xml334.00 B01-11-14|00:16
styles.xml391.00 B01-11-14|00:17
dimens.xml381.00 B23-05-14|21:08
config.xml4.04 kB23-05-14|21:16
MainActivity.java1.73 kB30-01-15|22:51
god0.00 B30-01-15|22:33
images0.00 B27-07-14|14:22
example0.00 B30-01-15|22:33
drawable-hdpi0.00 B30-12-14|21:52
drawable-mdpi0.00 B30-12-14|21:52
drawable-xhdpi0.00 B30-12-14|21:52
drawable-xxhdpi0.00 B30-12-14|21:52
god0.00 B30-01-15|22:33
god0.00 B27-07-14|14:22
css0.00 B27-07-14|14:22
image0.00 B27-07-14|14:22
js0.00 B27-07-14|14:22
com0.00 B30-01-15|22:33
crunch0.00 B30-12-14|21:52
drawable-hdpi0.00 B01-11-14|00:19
drawable-mdpi0.00 B01-11-14|00:19
drawable-xhdpi0.00 B01-11-14|00:19
drawable-xxhdpi0.00 B01-11-14|00:19
example0.00 B30-01-15|22:33
example0.00 B27-07-14|14:22
www0.00 B27-07-14|14:22
classes0.00 B30-01-15|22:33
dexedLibs0.00 B30-12-14|21:52
res0.00 B30-12-14|21:52
com0.00 B30-01-15|22:33
drawable-hdpi0.00 B27-07-14|14:22
drawable-ldpi0.00 B23-05-14|21:08
drawable-mdpi0.00 B27-07-14|14:22
drawable-xhdpi0.00 B27-07-14|14:22
drawable-xxhdpi0.00 B27-07-14|14:22
layout0.00 B27-07-14|14:22
menu0.00 B27-07-14|14:22
values0.00 B27-07-14|14:22
values-v110.00 B27-07-14|14:22
values-v140.00 B27-07-14|14:22
values-w820dp0.00 B27-07-14|14:22
xml0.00 B27-07-14|14:22
com0.00 B27-07-14|14:22
.settings0.00 B30-12-14|21:47
assets0.00 B27-07-14|14:22
bin0.00 B30-01-15|21:51
gen0.00 B30-01-15|22:33
libs0.00 B27-07-14|14:22
res0.00 B27-07-14|14:22
src0.00 B27-07-14|14:22
god0.00 B30-12-14|21:47
...
Sponsored links

jquery.js (6.65 MB)

Need 2 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D