]> source.dussan.org Git - gwtquery.git/commitdiff
dom attr should not be camelized because there are dom elements using the hyphen...
authorManolo Carrasco <manolo@apache.org>
Thu, 24 Feb 2011 13:56:47 +0000 (13:56 +0000)
committerManolo Carrasco <manolo@apache.org>
Thu, 24 Feb 2011 13:56:47 +0000 (13:56 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java

index 5db86e3a7a897f7aac4650ead2a786162a33b3b0..d45240f8f320ac616d4b210ec7ebd5ec5e5af032 100644 (file)
@@ -741,7 +741,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
   public GQuery attr(Properties properties) {\r
     for (Element e : elements()) {\r
       for (String name : properties.keys()) {\r
-        e.setAttribute(styleImpl.fixPropertyName(name), properties.get(name));\r
+        e.setAttribute(name, properties.get(name));\r
       }\r
     }\r
     return this;\r
@@ -754,7 +754,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
    * Attributes include title, alt, src, href, width, style, etc.\r
    */\r
   public String attr(String name) {\r
-    return elements.getItem(0).getAttribute(styleImpl.fixPropertyName(name));\r
+    return elements.getItem(0).getAttribute(name);\r
   }\r
 \r
   /**\r
@@ -763,7 +763,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
   public GQuery attr(String key, Function closure) {\r
     for (int i = 0; i < elements.getLength(); i++) {\r
       Element e = elements.getItem(i);\r
-      e.setAttribute(styleImpl.fixPropertyName(key), String.valueOf(closure.f(e, i)));\r
+      e.setAttribute(key, String.valueOf(closure.f(e, i)));\r
     }\r
     return this;\r
   }\r
@@ -772,7 +772,6 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
    * Set a single property to a value, on all matched elements.\r
    */\r
   public GQuery attr(String key, String value) {\r
-    key = styleImpl.fixPropertyName(key);\r
     for (Element e : elements()) {\r
       e.setAttribute(key, value);\r
     }\r