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">
<title>jQuery.isNumeric()</title>
<desc>Determines whether its argument is a number.</desc>
<signature>
<added>1.7</added>
<argument name="value" type="PlainObject">
<desc>The value to be tested.</desc>
</argument>
</signature>
<longdesc>
<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>
</longdesc>
<example>
<desc>Sample return values of $.isNumeric with various inputs.</desc>
<code><![CDATA[
$.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
]]></code>
</example>
<category slug="utilities"/>
<category slug="version/1.7"/>
</entry>
Something went wrong with that request. Please try again.