]> source.dussan.org Git - jquery.git/commitdiff
Fix for #467
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 11 Dec 2006 09:22:33 +0000 (09:22 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 11 Dec 2006 09:22:33 +0000 (09:22 +0000)
src/jquery/jquery.js

index 1efda2126f50fcb85c8ee0a5bbe2d595cc7ed984..9f9aac66a0cc04c22bfc24aed9a8a461a93681bd 100644 (file)
@@ -367,6 +367,10 @@ jQuery.fn = jQuery.prototype = {
        /**\r
         * Set a single property to a value, on all matched elements.\r
         *\r
+        * Note that you can't set the name property of input elements in IE.\r
+        * Use $(html) or $().append(html) or $().html(html) to create elements\r
+        * on the fly including the name property.\r
+        *\r
         * @example $("img").attr("src","test.jpg");\r
         * @before <img/>\r
         * @result <img src="test.jpg"/>\r
@@ -1300,7 +1304,8 @@ jQuery.extend({
                                ret = 'none';\r
                        else\r
                                jQuery.swap(elem, { display: 'block' }, function() {\r
-                                       ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop);\r
+                                   var c = document.defaultView.getComputedStyle(this, '');\r
+                                   ret = c && c.getPropertyValue(prop) || '';\r
                                });\r
 \r
                }\r