You can .off your handler with .off , but there is a warning; if you do this, simply prevent the handler from re-starting when it is already running, you need to delay the re-binding of the handler.
For example, consider this code, which uses a 5-second hot sleep to simulate something synchronous and computationally expensive, executed from a handler (say, heavy DOM manipulation):
<button id="foo">Click Me!</div> <script> function waitForFiveSeconds() { var startTime = new Date(); while (new Date() - startTime < 5000) {} } $('#foo').click(function handler() { </script>
This will not work. As you can see, if you try this in this JSFiddle , if you click the button when the handler is already running, the handler will be executed a second time when the first run ends. Moreover, at least in Chrome and Firefox, this will be true even if you did not use jQuery and used addEventListener and removeEventListener to add and remove a handler. The browser executes the handler after the first click, unbinds and re-binds the handler, and then processes the second click and checks if there is a click handler to execute.
To get around this, you need to delay re-binding the handler with setTimeout so that the clicks that occur during the execution of the first handler are handled before you re-hook the handler.
<button id="foo">Click Me!</div> <script> function waitForFiveSeconds() { var startTime = new Date(); while (new Date() - startTime < 5000) {} } $('#foo').click(function handler() { $('#foo').off('click'); console.log('Hello, World!'); waitForFiveSeconds(); </script>
You can see it in action on this modified JSFiddle .
Naturally, this is not necessary if what you are doing in your handler is already asynchronous, since then you are already transferring control to the browser and letting it reset all click events before rebinding your handler. For example, similar code would work well without calling setTimeout :
<button id="foo">Save Stuff</div> <script> $('#foo').click(function handler() { $('#foo').off('click'); $.post( "/some_api/save_stuff", function() { $('#foo').click(handler); }); }); </script>