Simple jQuery issue - how to check if $(this) is the last $(this) clicked?
<p>I am essentially adding radio-buttons functionality to buttons with the class "tagbutton". There is a flaw with my code, because _this is never _last...</p>

<pre><code>  taguid = "";
    _last = "";
    $('.tagbutton').live('click', function() {

    _this = $(this);
    if(_last) {
        //There was a last object
        if(_last == _this) { // The last object was the current object
            alert('deactiveate for this obj');
        } else { // The last object was not the current object
            alert('deactivate last, activate this');
        }
    } else {
        alert('first object activated');
        var taguid = $(this).prev().attr('data-uid');
        alert(taguid);
        _last = $(this);
    }

    });
</code></pre>
