Enable/Disable button click handlers in Javascript
<p>Ok, let's say that I have a button and I would like to enable/disable its click handlers.</p>

<p>I would like to create functions like these:</p>

<pre><code>var bar = [];
function storeHandlers(buttonID) {
    //I would like to store the click handlers in bar[buttonID]
}

function preventHandlers(buttonID) {
    storeHandlers(buttonID);
    //I would like to disable all the click handlers for button
}

function loadHandlers(buttonID) {
    //I would like to enable all the handlers loaded from bar[buttonID]
}
</code></pre>

<p>Is this possible? How can I achieve this?</p>

<p>Thank you in advance</p>
