JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">foo</div>
<button id="restore">restore handler</button>

JavaScript

$(document).ready(function() {
    var $test = $('#test');
    
    $test.bind('click', function() {
        alert('default handler');
    });    
    
    var storedClick = $test.data('events').click[0].handler;
    
    $test.unbind('click');
    
    $('#restore').click(function() {
        $test.bind('click', storedClick);
    });
});