]> source.dussan.org Git - jquery.git/commitdiff
Improves support for arbitrary numbers in data keys. Fixes #9318 456/head
authorRick Waldron <waldron.rick@gmail.com>
Fri, 5 Aug 2011 14:17:24 +0000 (10:17 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Fri, 5 Aug 2011 14:17:24 +0000 (10:17 -0400)
src/core.js

index db988a9b5c2198796e936d1294cc6a6b8317781d..7a77ae13270a2ee1a3ac3a0a597c821f013a26be 100644 (file)
@@ -46,11 +46,11 @@ var jQuery = function( selector, context ) {
        rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
 
        // Matches dashed string for camelizing
-       rdashAlpha = /-([a-z])/ig,
+       rdashAlpha = /-([a-z]|[0-9])/ig,
 
        // Used by jQuery.camelCase as callback to replace()
        fcamelCase = function( all, letter ) {
-               return letter.toUpperCase();
+               return ( letter + "" ).toUpperCase();
        },
 
        // Keep a UserAgent string for use with jQuery.browser