Easy Tutorial
❮ Jquery Hide Show Html Remove ❯

jQuery.noop() Method

jQuery Miscellaneous Methods

Example

Passing an empty function as a parameter, returns an empty array.

$(function () { 
    var result = $.map( [1, 2, 3], $.noop );
    document.writeln( result.length );   // 0
})

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, if the callback function is not passed during invocation, $.noop is used as a substitute to execute.


Syntax

jQuery Miscellaneous Methods

❮ Jquery Hide Show Html Remove ❯