2012-10-10 16:08:50 +07:00
|
|
|
//patch for jquery bug under firefox
|
|
|
|
(function(undefined) {
|
|
|
|
var rupper = /([A-Z]|^ms)/g;
|
|
|
|
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
2012-10-10 16:43:03 +07:00
|
|
|
var old = document.defaultView.getComputedStyle;
|
2012-10-10 16:08:50 +07:00
|
|
|
getComputedStyle = function( elem, name ) {
|
|
|
|
var ret, defaultView, computedStyle;
|
|
|
|
|
2012-10-10 16:43:03 +07:00
|
|
|
if ( !(defaultView = elem.ownerDocument.defaultView) ) {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (name == undefined || name == null) {
|
|
|
|
try {
|
|
|
|
return old(elem, null);
|
|
|
|
} catch (err) {
|
|
|
|
return "";
|
2012-10-10 16:08:50 +07:00
|
|
|
}
|
2012-10-10 16:43:03 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
name = name.replace( rupper, "-$1" ).toLowerCase();
|
2012-10-10 16:08:50 +07:00
|
|
|
|
2012-10-10 16:43:03 +07:00
|
|
|
try {
|
|
|
|
if ( (computedStyle = old( elem, null )) ) {
|
2012-10-10 16:08:50 +07:00
|
|
|
ret = computedStyle.getPropertyValue( name );
|
|
|
|
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
|
|
|
ret = jQuery.style( elem, name );
|
|
|
|
}
|
|
|
|
}
|
2012-10-10 16:43:03 +07:00
|
|
|
} catch (err) {
|
|
|
|
return "";
|
|
|
|
}
|
2012-10-10 16:08:50 +07:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
})();
|