// Define a local copy of jQuery
var jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
- return arguments.length === 0 ?
- rootjQuery :
- new jQuery.fn.init( selector, context );
+ return new jQuery.fn.init( selector, context );
},
// Map over jQuery in case of overwrite
jQuery.bindReady();
// If the DOM is already ready
- if ( jQuery.isReady ) {
+ if ( jQuery.isReady && !readyList ) {
// Execute the function immediately
fn.call( document, jQuery );
return ret.concat.apply( [], ret );
},
- // Use of jQuery.browser is deprecated.
- // It's included for backwards compatibility and plugins,
- // although they should work to migrate away.
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
browser: {
- version: (/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],
- safari: /webkit/.test( userAgent ),
+ version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0,'0'])[1],
+ safari: /safari/.test( userAgent ),
opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
- mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+ firefox: /firefox/.test( userAgent )
}
});
+// Deprecated
+jQuery.browser.mozilla = /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent );
+
if ( indexOf ) {
jQuery.inArray = function( elem, array ) {
return indexOf.call( array, elem );