Code has been added to clipboard!

The Correct Way to Use jQuery .off() Method

Reading time 1 min
Published Jan 9, 2018
Updated Oct 10, 2019

Web Development Course:

jQuery off: Main Tips

  • The .off() method makes jQuery remove event listeners from selected elements.
  • If no arguments are specified, jQuery .off() removes all event handlers attached to specified elements.

Usage of .off()

jQuery .off() method removes event handlers added using the .on() method.

$("button").click(() => {

jQuery .off(): Syntax

The syntax for .off() jQuery method is as follows:


jQuery .off() method takes three arguments:

  • event - an event type to specify what handlers should be removed. Accepts multiple values separated by spaces.
  • selector - a selector, which must match the one used by the .on() method to add the jQuery event handlers you now wish to remove.
  • handler - the name of the function that was run by the specified jQuery event handler.