JQuery, how to access click object after ajax call?
<p>this seems like it should be straightforward, but I'm having trouble getting it to work.</p>

<p>I have a .click bind to many buttons of a certain class. When that button is clicked, it passes its id to a $.post call for processing.</p>

<p>When the $.post call returns successfully, I'd like to remove the button and add a message to the container, but I can't seem to even access the button at that point.</p>

<p>Here is the .click bind:</p>

<pre><code>$('.button').click(function() {
    $.post('process.php', {
        action: 'checkit'
    },
    function(result) {
        if (result == 'win') {
            // Access the button that was pressed with jQuery
        }
        else {
            alert("fail");
        }
    });
});
</code></pre>

<p>I've tried, $(this), this, and also setting a variable like var trigger=this as I enter the initial click function, but none of these are working. I get undefined, or it points to the actual JQuery object, not the button.</p>

<p>Does anyone have any insight into how I can access the button that was clicked at that point, using a jQuery wrapper, essentially something like $( <em>triggered button</em> ).html() so that I can manipulate the correct button?</p>

<p>Thanks for your time.</p>
