From: Jörn Zaefferer Date: Mon, 11 Dec 2006 09:22:33 +0000 (+0000) Subject: Fix for #467 X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=df61a63fca0bc7d1d3e3a0e7ec1e06ce2bd8fb53 Fix for #467 --- 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) || ''; }); }