From df61a63fca0bc7d1d3e3a0e7ec1e06ce2bd8fb53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 11 Dec 2006 09:22:33 +0000 Subject: [PATCH] Fix for #467 --- src/jquery/jquery.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 1efda21..9f9aac6 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 @@ -1300,7 +1304,8 @@ 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) || ''; }); } -- 1.7.10.4