mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fixes #13088: under IE8, $(selector).attr('style') always return lowercase string
This commit is contained in:
@@ -600,8 +600,9 @@ if ( !jQuery.support.style ) {
|
||||
jQuery.attrHooks.style = {
|
||||
get: function( elem ) {
|
||||
// Return undefined in the case of empty string
|
||||
// Normalize to lowercase since IE uppercases css property names
|
||||
return elem.style.cssText.toLowerCase() || undefined;
|
||||
// Note: IE uppercases css property names, but if we were to .toLowerCase()
|
||||
// .cssText, that would destroy case senstitivity in URL's, like in "background"
|
||||
return elem.style.cssText || undefined;
|
||||
},
|
||||
set: function( elem, value ) {
|
||||
return ( elem.style.cssText = value + "" );
|
||||
|
||||
Reference in New Issue
Block a user