forked from jquery/api.jquery.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery.isFunction.xml
More file actions
30 lines (30 loc) · 1.17 KB
/
jQuery.isFunction.xml
File metadata and controls
30 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0"?>
<entry type="method" name="jQuery.isFunction" return="boolean" deprecated="3.3" removed="4.0">
<title>jQuery.isFunction()</title>
<signature>
<added>1.2</added>
<argument name="value" type="Anything">
<desc>The value to be tested.</desc>
</argument>
</signature>
<desc>Determines if its argument is callable as a function.</desc>
<longdesc>
<div class="warning">
<p>As of jQuery 3.3, <code>jQuery.isFunction()</code> has been deprecated. In most cases, its use can be replaced by <code>typeof x === "function"</code>.</p>
</div>
<p><strong>Note:</strong> As of jQuery 1.3, functions provided by the browser like <code>alert()</code> and DOM element methods like <code>getAttribute()</code> are not guaranteed to be detected as functions in browsers such as Internet Explorer.</p>
</longdesc>
<example>
<desc>Finds out if the parameter is a function.</desc>
<code><![CDATA[
$.isFunction(function() {});
]]></code>
<results><![CDATA[
true
]]></results>
</example>
<category slug="utilities"/>
<category slug="version/1.2"/>
<category slug="deprecated/deprecated-3.3"/>
<category slug="removed"/>
</entry>