Javascript cancel POST from another piece of code using one single function
<p>Ok, in my code I have for example, this:</p>

<pre><code>$('.follow').click(function(){
        var myself = $(this);
        var data = {
            id: this.getAttribute('data-id')
        }
        $.post('/users/setFriend', data, function(msg){
            myself.text(msg);
            myself.attr('data-status-friends', (myself.attr('data-status-friends').toLowerCase() == 'follow') ? 'following' : 'follow');
        });
    })
</code></pre>

<p>However, i put a class of 'auth' on certain elements that if the user is logged out, run this bit of JS:</p>

<pre><code>$('.auth').click(function(e){
    e.preventDefault();
    alert('not logged in');
});
</code></pre>

<p>This works for the majority of elements, but with the above POST, it seems to still action the POST. How can I definitively cancel the events fired by other bits of code if .auth is clicked?</p>
