Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (50 sloc) 1.68 kb
<?xml version="1.0"?>
<entry type="method" name="jQuery.isFunction" return="boolean">
<argument name="obj" type="PlainObject">
<desc>Object to test whether or not it is a function.</desc>
<desc>Determine if the argument passed is a Javascript function object. </desc>
<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>
<desc>Test a few parameter examples.</desc>
function stub() {
var objs = [
function () {},
{ x:15, y:20 },
jQuery.each(objs, function (i) {
var isFunc = jQuery.isFunction(objs[i]);
div { color:blue; margin:2px; font-size:14px; }
span { color:red; }
<div>jQuery.isFunction(objs[0]) = <span></span></div>
<div>jQuery.isFunction(objs[1]) = <span></span></div>
<div>jQuery.isFunction(objs[2]) = <span></span></div>
<div>jQuery.isFunction(objs[3]) = <span></span></div>
<div>jQuery.isFunction(objs[4]) = <span></span></div>
<desc>Finds out if the parameter is a function.</desc>
<category slug="utilities"/>
<category slug="version/1.2"/>
Jump to Line
Something went wrong with that request. Please try again.