jQuery.noop() JQ Home  <<  Utilities  <<  jQuery.noop()

An empty function.

Description

The jQuery.noop() jQuery General utility method is used to pass around an empty function.

Shorthand version $.noop()

  • Useful for when you wish to pass around a function that will do nothing.
  • The jQuery.noop() jQuery General utility method, can be used as a single empty function instead of declaring empty anonymous functions all over the place.
  • Where optional callbacks are in place and no callback is given, the jQuery.noop() jQuery General utility method could be used instead.

Syntax

Signature Description
jQuery.noop()Used to pass around an empty function.

Parameters

None.

Return

An empty Function object.


Related Tutorials

jQuery Intermediate Tutorials - Lesson 9 - jQuery General Utilities