I HAVE A PROBLEM WITH THIS CODE

$('.reply_stdelete').live('click',function() 
    {
        var ID = $(this).attr("id");
        //var X=$(this).attr("my");
        var dataString = 'c_id='+ ID ;

        jConfirm('Sure you want to delete this conversation?', '', 
        function(r) 
        {
            if(r==true)
            {
                $.ajax({
                type: "POST",
                url: "<?php echo $base_url; ?>conversation_delete_ajax.php",
                data: dataString,
                cache: false,
                beforeSend: function()
                { 
                    $("#stbody"+ID).animate(
                    {
                        'backgroundColor':'#f2f2f2'
                    },300);
                },
                success: function(html)
                {
                    window.location='<?php echo $base_url; ?>messages.php';
                }
                });
            } 
        });
    return false;
    });

it goes on the message (jConfirm('Sure you want to delete this conversation?) and it dletes the record from the database but it doesnt work asynchronous like ajax.

and the html

<span class="reply_stdelete" href="#" id="<?php echo $c_id; ?>" original-title="Delete"></span>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.