Changeset 2818
- Timestamp:
- 08/21/07 05:43:44 (1 year ago)
- Location:
- trunk/jquery/src
- Files:
-
- 5 modified
-
event/event.js (modified) (2 diffs)
-
intro.js (modified) (1 diff)
-
jquery/jquery.js (modified) (6 diffs)
-
outro.js (modified) (1 diff)
-
selector/selector.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/event/event.js
r2791 r2818 579 579 }); 580 580 581 new function(){582 583 581 /** 584 582 * Bind a function to the scroll event of each matched element. … … 977 975 // A fallback to window.onload, that will always work 978 976 jQuery.event.add( window, "load", jQuery.ready ); 979 980 }; -
trunk/jquery/src/intro.js
r1928 r2818 1 1 // prevent execution of jQuery if included more than once 2 if(typeof window.jQuery == "undefined") {2 if(typeof window.jQuery == "undefined") (function(){ -
trunk/jquery/src/jquery/jquery.js
r2817 r2818 9 9 * $Rev$ 10 10 */ 11 12 // Global undefined variable13 window.undefined = window.undefined;14 11 15 12 /** … … 23 20 * @cat Core 24 21 */ 25 varjQuery = function(a,c) {22 window.jQuery = function(a,c) { 26 23 // If the context is global, return a new object 27 24 if ( window == this || !this.init ) … … 36 33 37 34 // Map the jQuery namespace to the '$' one 38 var$ = jQuery;35 window.$ = jQuery; 39 36 40 37 /** … … 1528 1525 1529 1526 if (prop.match(/float/i)) 1530 prop = jQuery.styleFloat;1527 prop = styleFloat; 1531 1528 1532 1529 if (!force && elem.style[prop]) … … 1941 1938 * @cat JavaScript 1942 1939 */ 1943 new function() { 1944 var b = navigator.userAgent.toLowerCase(); 1945 1946 // Figure out what browser is being used 1947 jQuery.browser = { 1948 version: (b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], 1949 safari: /webkit/.test(b), 1950 opera: /opera/.test(b), 1951 msie: /msie/.test(b) && !/opera/.test(b), 1952 mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) 1953 }; 1954 1940 var userAgent = navigator.userAgent.toLowerCase(); 1941 1942 // Figure out what browser is being used 1943 jQuery.browser = { 1944 version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], 1945 safari: /webkit/.test(userAgent), 1946 opera: /opera/.test(userAgent), 1947 msie: /msie/.test(userAgent) && !/opera/.test(userAgent), 1948 mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) 1949 }; 1950 1951 var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat"; 1952 1953 jQuery.extend({ 1955 1954 // Check to see if the W3C box model is being used 1956 jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";1957 1958 jQuery.styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";1959 1960 jQuery.props ={1955 boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", 1956 1957 styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat", 1958 1959 props: { 1961 1960 "for": "htmlFor", 1962 1961 "class": "className", 1963 "float": jQuery.styleFloat,1964 cssFloat: jQuery.styleFloat,1965 styleFloat: jQuery.styleFloat,1962 "float": styleFloat, 1963 cssFloat: styleFloat, 1964 styleFloat: styleFloat, 1966 1965 innerHTML: "innerHTML", 1967 1966 className: "className", … … 1972 1971 selected: "selected", 1973 1972 maxlength: "maxLength" 1974 }; 1975 1976 }; 1973 } 1974 }); 1977 1975 1978 1976 /** -
trunk/jquery/src/outro.js
r1023 r2818 1 } 1 })(); -
trunk/jquery/src/selector/selector.js
r2518 r2818 1 2 var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? 3 "(?:[\\w*_-]|\\\\.)" : 4 "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", 5 quickChild = new RegExp("^[/>]\\s*(" + chars + "+)"), 6 quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), 7 quickClass = new RegExp("^([#.]?)(" + chars + "*)"); 8 1 9 jQuery.extend({ 2 10 expr: { … … 63 71 64 72 // Match: :even, :last-chlid, #id, .class 65 new RegExp("^([:.#]*)(" + 66 ( jQuery.chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? "(?:[\\w*_-]|\\\\.)" : "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)") 73 new RegExp("^([:.#]*)(" + chars + "+)") 67 74 ], 68 75 … … 126 133 // An attempt at speeding up child selectors that 127 134 // point to a specific element tag 128 var re = new RegExp("^[/>]\\s*(" + jQuery.chars + "+)");135 var re = quickChild; 129 136 var m = re.exec(t); 130 137 … … 195 202 } else { 196 203 // Optimize for the case nodeName#idName 197 var re2 = new RegExp("^(" + jQuery.chars + "+)(#)(" + jQuery.chars + "+)");204 var re2 = quickID; 198 205 var m = re2.exec(t); 199 206 … … 205 212 // Otherwise, do a traditional filter check for 206 213 // ID, class, and element selectors 207 re2 = new RegExp("^([#.]?)(" + jQuery.chars + "*)");214 re2 = quickClass; 208 215 m = re2.exec(t); 209 216 }
