代碼如下: /* prevent execution of jQuery if included more then once */ if(typeof window.jQuery == "undefined") { /* * jQuery 1.0.2 - New Wave Javascript * * Copyright (c) 2006 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2006-10-09 20:23:18 -0400 (Mon, 09 Oct 2006) $ * $Rev: 413 $ */
// Shortcut for document ready (because $(document).each() is silly) if ( a && typeof a == "function" && jQuery.fn.ready ) return jQuery(document).ready(a);
// Make sure that a selection was provided a = a || jQuery.context || document;
// Watch for when a jQuery object is passed as the selector if ( a.jquery ) return jQuery( jQuery.merge( a, [] ) );
// Watch for when a jQuery object is passed at the context if ( c && c.jquery ) return jQuery( c ).find(a);
// If the context is global, return a new object if ( window == this ) return new jQuery(a,c);
// Handle HTML strings var m = /^[^<]*(<.+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] );
// Watch for when an array is passed in this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ? // Assume that it is an array of DOM Elements