jQuery, trying to save click event, unbind and rebind, unable to rebind
<p>I am stuck trying to unbind and rebind a click event.  I want to "save" the click event, unbind it, and rebind it with a conditional statement.</p>

<p>I'm able to get the click handler saved using the information here:  <a href="http://stackoverflow.com/questions/2518421/jquery-find-events-handlers-registered-with-an-object/2519061#2519061">jQuery find events handlers registered with an object</a></p>

<p>I am on an older version of jQuery (1.5), so I'm using the data("events") method.</p>

<p>So far...</p>

<pre><code>var events = $('#myElement').data("events");

alert(events.click[0].handler);

$('#myElement').unbind('click');
</code></pre>

<p>Now it will alert me the handler function and it looks correct.  I want to add stuff to it, but I thought for starters I would just try rebinding the same click event.  However, I'm not sure how to rebind correctly.  Things I have tried:</p>

<pre><code>$('#myElement').bind('click', null, events.click[0].handler); // gives 'click.0 is null or not an object

$('#myElement').bind('click', events.click[0].handler); // gives 'click.0 is null or not an object

$('#myElement').bind('click', null, events.click); // seems to have no effect

$('#myElement').bind('click', events.click); // seems to have no effect
</code></pre>

<p>So I feel I almost have it but I'm not sure what to do from here.  How do I use the events variable to rebind the click event?</p>

<p>Thank you for any and all help.</p>
