jQuery.noop()Method
Example
Pass an empty function as a parameter, and it returns an empty array
$(function () {
var result = $.map( [1, 2, 3], $.noop );
document.writeln( result.length ); // 0
})
Try it Yourself »
Definition and Usage
The $.noop() function is an empty function.
Note: This method does not accept any parameters.For example, when a plugin provides an optional callback function interface, then if this callback is not passed when calling, use $.noop to execute instead.
Syntax
$.noop()
Other Extensions
jQuery Misc Methods