git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #193 again
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
31dde99
..
2ddb919
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-28,7
+28,7
@@
window.undefined = window.undefined;
* @name jQuery
* @cat Core
*/
* @name jQuery
* @cat Core
*/
-function jQuery(a,c) {
+var jQuery = function(a,c) {
// Shortcut for document ready (because $(document).each() is silly)
if ( a && typeof a == "function" && jQuery.fn.ready )
// Shortcut for document ready (because $(document).each() is silly)
if ( a && typeof a == "function" && jQuery.fn.ready )
@@
-71,7
+71,7
@@
function jQuery(a,c) {
this.each(fn);
return this;
this.each(fn);
return this;
-}
+};
// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
@@
-1297,8
+1297,17
@@
jQuery.fn = jQuery.prototype = {
* @cat Javascript
*/
jQuery.extend = jQuery.fn.extend = function(obj,prop) {
* @cat Javascript
*/
jQuery.extend = jQuery.fn.extend = function(obj,prop) {
+ // Watch for the case where null or undefined gets passed in by accident
+ if ( arguments.length > 1 && (prop === null || prop == undefined) )
+ return obj;
+
+ // If no property object was provided, then we're extending jQuery
if ( !prop ) { prop = obj; obj = this; }
if ( !prop ) { prop = obj; obj = this; }
+
+ // Extend the base object
for ( var i in prop ) obj[i] = prop[i];
for ( var i in prop ) obj[i] = prop[i];
+
+ // Return the modified object
return obj;
};
return obj;
};
@@
-1492,6
+1501,9
@@
jQuery.extend({
} else if (document.defaultView && document.defaultView.getComputedStyle) {
} else if (document.defaultView && document.defaultView.getComputedStyle) {
+ if (prop == "cssFloat" || prop == "styleFloat")
+ prop = "float";
+
prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
var cur = document.defaultView.getComputedStyle(elem, null);
prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
var cur = document.defaultView.getComputedStyle(elem, null);