YouTip LogoYouTip

Misc Isfunction

# jQuery.isFunction() Method [![Image 4: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Test whether some parameters are functions
jQuery.isFunction( objs ) =
jQuery.isFunction( objs ) =
jQuery.isFunction( objs ) =
jQuery.isFunction( objs ) =
jQuery.isFunction( objs ) =
$(function(){function stub(){}var objs = [function(){}, {x:15, y:20}, null, stub, "function"]; $.each(objs, function(i){var isFunc = $.isFunction(objs); $("span").eq(i).text(isFunc); }); }) [Try it Β»](#) * * * ## Definition and Usage The $.isFunction() function is used to determine whether the specified parameter is a function. **Note:** In versions after jQuery 1.3, for example in Internet Explorer, browser-provided functions like alert(), and DOM element methods (such as getAttribute()) will not be considered functions. * * * ## Syntax _$_.isFunction( object ) | Parameter | Description | | :--- | :--- | | _object_ | Any type. The value to be checked. | * * * ![Image 5: Example](#) ## More Examples (#) Determine whether the passed parameter is a function. * * jQuery Misc Methods](#)
← Misc IsplainobjectMisc Isarray β†’