POST not working inside click function
<p>I have this working perfectly:</p>

<pre><code>$.post("check_i.php",  {value: '&lt;?php echo md5($_SERVER['REMOTE_ADDR']);?&gt;'},
    function(result) {
        if(result == 'true') {
            alert('true');
        } else {
            $.post("update_pop_count.php",  {site: '&lt;?php echo $site;?&gt;'});
        }
    });  
</code></pre>

<p>However when I try to put this inside a click link function, in firebug I can see that check_i.php takes forever, and update pop count is never called (i can see in the database that the count is not updated)</p>

<p>This is my code with the click function:</p>

<pre><code>$("a").click(function() {
        $.post("stats_include/ajax/check_i.php",  {value: '&lt;?php echo md5($_SERVER['REMOTE_ADDR']);?&gt;'},
        function(result) {
            if(result == 'true') {
                alert('true');
            } else {
                $.post("stats_include/ajax/update_pop_count.php",  {site: '&lt;?php echo $site;?&gt;'});
            }
        });     
    }); 
</code></pre>

<p>This is all inside a document.ready function. Any ideas?</p>
