Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (36 sloc) 1.27 KB
<?xml version="1.0"?>
<entry type="method" name="jQuery.isNumeric" return="Boolean">
<desc>Determines whether its argument is a number.</desc>
<argument name="value" type="PlainObject">
<desc>The value to be tested.</desc>
<p>The <code>$.isNumeric()</code> method checks whether its argument represents a numeric value. If so, it returns <code>true</code>. Otherwise it returns <code>false</code>. The argument can be of any type.</p>
<desc>Sample return values of $.isNumeric with various inputs.</desc>
$.isNumeric("-10"); // true
$.isNumeric(16); // true
$.isNumeric(0xFF); // true
$.isNumeric("0xFF"); // true
$.isNumeric("8e5"); // true (exponential notation string)
$.isNumeric(3.1415); // true
$.isNumeric(+10); // true
$.isNumeric(0144); // true (octal integer literal)
$.isNumeric(""); // false
$.isNumeric({}); // false (empty object)
$.isNumeric(NaN); // false
$.isNumeric(null); // false
$.isNumeric(true); // false
$.isNumeric(Infinity); // false
$.isNumeric(undefined); // false
<category slug="utilities"/>
<category slug="version/1.7"/>
Something went wrong with that request. Please try again.