.click function not working
<p>I have JavaScript for a commenting system, however when I click on the submit button with the class name "com_submit" nothing happens except the page reloads. Even if I leave the form empty and submit the alert should pop up but it isn't. What am I doing wrong?</p>

<p>Here is my code: </p>

<pre><code>$(function() {

$('.com_submit').live("click", function() {
    var comment = $("#comment").val();
    var user_id = $("#user_id").val();
    var perma_id = $("#perma_id").val();
    var dataString = 'comment='+ comment + '&amp;user_id='+ user_id + '&amp;perma_id=' + $perma_id;
    if(comment=='') {
        alert('Please Give Valid Details');
    }
    else {
        $("#flash").show();
        $("#flash").fadeIn(400).html('&lt;img src="ajax-loader.gif" /&gt;Loading Comment...');
        $.ajax({
            type: "POST",
            url: "commentajax.php",
            data: dataString,
            cache: false,
            success: function(html){
                $("ol#update").append(html);
                $("ol#update li:first").fadeIn("slow");
                $("#flash").hide();
            }
        });
    }
    return false;
});
});
</code></pre>

<p>I have tried using .click, .live and .bind none of these work</p>
