How to suppress jQuery event handling temporarily?

jQueryWeb DevelopmentFront End Technology

To suppress jQuery event handling temporarily, add a class to your element so that you can prevent further code from execution.


You can try to run the following code to learn how to suppress jQuery event handling −

Live Demo

<!DOCTYPE html>
<script src=""></script>
    $(element).click(function(e) {

        // Check for fired class
        if ($(this).hasClass('fired') == false) {
          // Add fired class

          // Remove fired class
.fired {
    font-size: 25px;
    color: green;

<h1>This is a heading</h1>
<p class="fired">This is a paragraph.</p>
<p class="fired">This is second paragraph.</p>
Published on 20-Dec-2017 08:32:52