jQuery.noop() method
Example
Pass an empty function as an argument and return an empty array
$
(
function
(
)
{
var
result
= $.
map
(
[
1
,
2
,
3
]
, $.
noop
)
;
document
.
writeln
(
result
.
length
)
;
//
0
}
)
Try it »
Definition and Usage
The $.noop() function is an empty function.
**Note: This method accepts no arguments.** For example, when a plugin provides an optional callback interface, if no callback is passed at call time, $.noop is used instead.
Syntax
$
.noop()
jQuery Miscellaneous Methods