JQuery删除按钮不起作用

Hi I have a JQuery function which creates a popup dialog box, which you have to click to continue, however whilst the box pops up and everything works fine the link doesn't trigger the php link.

Below is the JQuery code:.

jQuery('.delete-row').click(function () {
    var conf = confirm('Continue delete?');
    if (conf) jQuery(this).parents('tr').fadeOut(function () {
       jQuery(this).remove();
    });
    return false;
});

And here is my code which calls the dialog box and should pass the php info to the block.php page:

 echo "<a href=\"block.php?ip_address={$ip_address}&id={$id}&userna={$username1}\" class='delete-row' data-original-title='Delete'>Block</a>";

You could try:

jQuery(document).on('click', '.delete-row', function () {
    var conf = confirm('Continue delete?');
    if (conf){ jQuery(this).parents('tr').fadeOut(function () {
            jQuery(this).remove();
        });
        return true;
    }
    return false;
})

Looks like your function always return false : this prevents the event from being processed.

You should return true if (conf) and return false otherwise.

jQuery('.delete-row').click(function () {
    var conf = confirm('Continue delete?');
    if (conf) { 
       jQuery(this).parents('tr').fadeOut(function () {
            jQuery(this).remove();
       });

       return true;
    }
    // else...
    return false;
});