Standardizing on .test() and .exec() - moving away from using .match() for RegExp. Fixes jQuery bug #4113.
This commit is contained in:
parent
a3b8ac413f
commit
0d5c3a68a0
7 changed files with 20 additions and 20 deletions
|
@ -75,7 +75,7 @@ jQuery.extend({
|
|||
}
|
||||
|
||||
return style.filter && style.filter.indexOf("opacity=") >= 0 ?
|
||||
(parseFloat( style.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
|
||||
(parseFloat( /opacity=([^)]*)/.exec(style.filter)[1] ) / 100) + '':
|
||||
"";
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ jQuery.extend({
|
|||
|
||||
// IE uses filters for opacity
|
||||
if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
|
||||
ret = (elem.currentStyle.filter || "").match(/opacity=([^)]*)/) ?
|
||||
ret = /opacity=([^)]*)/.test(elem.currentStyle.filter || "") ?
|
||||
(parseFloat(RegExp.$1) / 100) + "" :
|
||||
"";
|
||||
|
||||
|
@ -207,4 +207,4 @@ jQuery.extend({
|
|||
for ( var name in options )
|
||||
elem.style[ name ] = old[ name ];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue