Commit 8ebb9b22 authored by jeresig's avatar jeresig

Switch to using isNaN instead of RegExp for data-.

parent e0b24306
(function( jQuery ) {
var windowData = {},
rnum = /^-?\d+(?:\.\d+)?(?:E\d+)?$/,
rbrace = /^(?:{.*}|\[.*\])$/;
jQuery.extend({
......@@ -158,7 +157,7 @@ jQuery.fn.extend({
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
rnum.test( data ) ? parseFloat( data ) :
!isNaN( data ) ? parseFloat( data ) :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
} catch( e ) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment