Side navigation
Ticket #2954: patch_nan.txt
File patch_nan.txt, 0.6 KB (added by lrbabe, May 29, 2008 01:37PM UTC)
patch to replace the test with isNaN()
Index: /home/lrbabe/workspace/jQuery/jquery/src/core.js
===================================================================
--- /home/lrbabe/workspace/jQuery/jquery/src/core.js (revision 5654)
+++ /home/lrbabe/workspace/jQuery/jquery/src/core.js (working copy)
@@ -1098,7 +1098,7 @@
// Set the alpha filter to set the opacity
elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
- (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
+ (isNaN(parseInt(value))? "" : "alpha(opacity=" + value * 100 + ")");
}
return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
Download in other formats:
Original Format
File patch_nan.txt, 0.6 KB (added by lrbabe, May 29, 2008 01:37PM UTC)
patch to replace the test with isNaN()
Index: /home/lrbabe/workspace/jQuery/jquery/src/core.js
===================================================================
--- /home/lrbabe/workspace/jQuery/jquery/src/core.js (revision 5654)
+++ /home/lrbabe/workspace/jQuery/jquery/src/core.js (working copy)
@@ -1098,7 +1098,7 @@
// Set the alpha filter to set the opacity
elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
- (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
+ (isNaN(parseInt(value))? "" : "alpha(opacity=" + value * 100 + ")");
}
return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?