{"id":398,"date":"2023-08-25T17:22:36","date_gmt":"2023-08-25T17:22:36","guid":{"rendered":"\/\/api.jquery.com\/?p=398"},"modified":"2026-01-20T17:34:53","modified_gmt":"2026-01-20T17:34:53","slug":"jQuery.isFunction","status":"publish","type":"post","link":"https:\/\/api.jquery.com\/jQuery.isFunction\/","title":{"rendered":"jQuery.isFunction()"},"content":{"rendered":"<article id=\"jQuery-isFunction1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">jQuery.isFunction( value )<\/span><span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#boolean\">boolean<\/a><\/span><span class=\"version-details\">version deprecated: <a href=\"\/category\/version\/3.3\/\">3.3<\/a>, removed: <a href=\"\/category\/version\/4.0\/\">4.0<\/a><\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong>Determines if its argument is callable as a function.<\/p>\n<ul class=\"signatures\"><li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version added: <a href=\"\/category\/version\/1.2\/\">1.2<\/a><\/span><a id=\"jQuery-isFunction-value\" href=\"#jQuery-isFunction-value\"><span class=\"icon-link\"><\/span>jQuery.isFunction( value )<\/a>\n<\/h4>\n<ul><li id=\"jQuery-isFunction-value-value\">\n<div><strong>value<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Anything\">Anything<\/a>\n<\/div>\n<div>The value to be tested.<\/div>\n<\/li><\/ul>\n<\/li><\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n    <div class=\"warning\">\n      <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>\n    <\/div>\n    <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>\n  <\/div>\n<section class=\"entry-examples\" id=\"entry-examples\"><header><h2>Example:<\/h2><\/header><div class=\"entry-example\" id=\"example-0\">\n<p>Finds out if the parameter is a function.<\/p>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code>$.isFunction(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{});<\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<h4>Result:<\/h4>\n<div class=\"syntaxhighlighter javascript\">\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"gutter\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"line n1\">1<\/div>\n\t\t\t\t\t\n\t\t\t\t<\/td>\n\t\t\t\t\n\t\t\t\t<td class=\"code\">\n\t\t\t\t\t<pre><div class=\"container\"><div class=\"line\"><code><span class=\"hljs-literal\">true<\/span><\/code><\/div><\/div><\/pre>\n\t\t\t\t<\/td>\n\t\t\t<\/tr>\n\t\t<\/tbody>\n\t<\/table>\n<\/div>\n\n<\/div><\/section>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Determines if its argument is callable as a function.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,61,76,84],"tags":[],"class_list":["post-398","post","type-post","status-publish","format-standard","hentry","category-deprecated-33","category-removed","category-utilities","category-84"],"_links":{"self":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/comments?post=398"}],"version-history":[{"count":6,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":1560,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/398\/revisions\/1560"}],"wp:attachment":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/media?parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/categories?post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/tags?post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}