diff options
author | dmethvin <dave.methvin@gmail.com> | 2011-08-17 17:30:31 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-08-17 17:34:09 -0400 |
commit | 1a738cb72fa9f8b7280f15586a68ef9377b18976 (patch) | |
tree | 1806920c7c2f6b55e687f1a203dd3ec760cc18a1 /src | |
parent | 130a29e78666def3b477056978406ea2fbcdad2b (diff) | |
download | jquery-1a738cb72fa9f8b7280f15586a68ef9377b18976.tar.gz jquery-1a738cb72fa9f8b7280f15586a68ef9377b18976.zip |
Landing pull request 463. Fixes #9572. Don't camelize the `-ms-` prefix because Microsoft didn't. A Fixes #9572.
More Details:
- https://github.com/jquery/jquery/pull/463
- http://bugs.jquery.com/ticket/9572
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core.js b/src/core.js index 7a77ae132..694f884d6 100644 --- a/src/core.js +++ b/src/core.js @@ -47,6 +47,7 @@ var jQuery = function( selector, context ) { // Matches dashed string for camelizing rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { @@ -590,10 +591,10 @@ jQuery.extend({ } }, - // Converts a dashed string to camelCased string; - // Used by both the css and data modules + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { - return string.replace( rdashAlpha, fcamelCase ); + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { |