X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=9f9aac66a0cc04c22bfc24aed9a8a461a93681bd;hb=df61a63fca0bc7d1d3e3a0e7ec1e06ce2bd8fb53;hp=1efda2126f50fcb85c8ee0a5bbe2d595cc7ed984;hpb=a8bafe78745247dd13e3472582df29471e50aa28;p=jquery.git 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) || ''; }); }