im jquery kullanarak bir li bir öğeyi silmek için çalışıyor, ama onun heres benim kod çalışmıyor?
html dosyası:
<li>
    <a href="nano.com/$username"><img class="avatar" src="images/$picture" width="48" height="48" alt="avatar" /></a>
    <div class="tweetTxt">
        <strong><a href="nano.com/$username">$username</a></strong> $auto
        <div class="date">$rel</div>
        $reply_info
        <div class="date"></div>
        <a class ="delbutton"  href="#" id = $id> Delete </a>
    </div>
    <div class="clear"></div>
</li>
JQuery dosyası:
$(function () {
    $(".delbutton").click(function () {
        var del_id = element.attr("id");
        var info = 'id=' + del_id;
        if (confirm("Sure you want to delete this update? There is NO undo!")) {
            $.ajax({
                type: "POST",
                url: "delete.php",
                data: info,
                success: function () {}
            });
            $(this).parents(".record").animate({
                backgroundColor: "#fbc7c7"
            }, "fast")
                .animate({
                    opacity: "hide"
                }, "slow");
        }
        return false;
    });
});
delete.php dosyası:
<?php
    include("includes/connect.php");
    if($_POST['id'])
    {
        $id=$_POST['id'];
        $sql = "delete from {$prefix}notes where id='$id'";
        mysql_query( $sql);
    }
?>