传递变量到点击函数jquery容易确认


Pass variable to click function jquery easy confirm

可能的重复项:
如何在jquery中传递变量轻松确认

传递变量到点击函数jquery轻松确认

通过使用javascript confim,我已经完成了暂停。现在我想把它变成jquery容易确认我该怎么做

我的PHP代码(这个函数在循环中调用):

function prepareRow( $flag, $Id )
{
$rowResponse = '<tr>    
                    <td style="width:12%"> ' . $Id . ' </td>
                    <td><a href="javascript:void(0);" id="suspend" ></a> </td>
                </tr>'; 
return  $rowResponse            
}

Jquery轻松确认链接:http://projectshadowlight.org/jquery-easy-confirm-dialog/

我已经尝试过这样,但如果单击"",我想将"$id"传递给它。这样我就可以暂停行。

请帮帮我

$("#suspend").easyconfirm({locale: {
    title: 'Are you sure?',
    text: 'Are you sure, you want to suspend?',
    button: ['No',' Yes'],
    closeText: 'Close'
}});
$("#suspend").click(function() {
    $.post("suspend.php", { "Id" : Id }, 
            function(data){
                $.ajax({
                    type:"POST",
                    url: "prepareTable.php",
                    success: function(data){
                    $("#example").html(data);
                }
                });
            });
});

我已经尝试了有关jquery的示例,在本地系统中轻松确认在其中发现了错误。所以我不再担心这个问题并使用了jConfirm