Pass variable between events
<p>I have an edit button that, when clicked, triggers the first event below. It(edit form) also have a cancel link that, when clicked, triggers the second event below. How do I ensure that the <code>PrevContent</code> value is accessible within the cancel event?  The user may click on any number of corresponding edit links at one time.</p>

<pre><code>$('.js-profile-edit').live('click',function(){

    var TrBlock     = $(this).closest('tr');
    var PrevContent = TrBlock.html();
    var colspan     = TrBlock.parent().prev().find('a:first').first().data('span');

    $.ajax({
        url     : $(this).attr('href'),
        type    : 'GET',
        success : function(response){
            TrBlock.html('&lt;td colspan="'+colspan+'"&gt;'+response+'&lt;/td&gt;');
        },
        error    : function(jqXHR, textStatus, errorThrown){
            uiAlert({message : 'Something Broke. Try again later'})
        }
    });
    return false;
});


$('.js-profile-edit-cancel').live('click',function(){
    $(this).closest('tr').html(PrevContent);
    return false;
});
</code></pre>
