X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=9e62fe3cb7f37cb845b23baee2eeb5c83a63ace7;hb=665e1959cc03292a5109796dc1618d3848ec6f6e;hp=1efda2126f50fcb85c8ee0a5bbe2d595cc7ed984;hpb=94e59e287a9fde9425cd96713e8130aef06bc431;p=jquery.git
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 1efda21..9e62fe3 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -367,6 +367,10 @@ jQuery.fn = jQuery.prototype = {
/**
* Set a single property to a value, on all matched elements.
*
+ * Note that you can't set the name property of input elements in IE.
+ * Use $(html) or $().append(html) or $().html(html) to create elements
+ * on the fly including the name property.
+ *
* @example $("img").attr("src","test.jpg");
* @before
* @result
@@ -1281,11 +1285,6 @@ jQuery.extend({
ret = elem.style[prop];
- } else if (elem.currentStyle) {
-
- var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
- ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
-
} else if (document.defaultView && document.defaultView.getComputedStyle) {
if (prop == "cssFloat" || prop == "styleFloat")
@@ -1300,9 +1299,15 @@ jQuery.extend({
ret = 'none';
else
jQuery.swap(elem, { display: 'block' }, function() {
- ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop);
+ var c = document.defaultView.getComputedStyle(this, '');
+ ret = c && c.getPropertyValue(prop) || '';
});
+ } else if (elem.currentStyle) {
+
+ var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
+ ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
+
}
return ret;