传递变量点击功能的jQuery容易确认
问题描述:
可能重复:
How pass variable in 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容易确认发现的bug吧。所以我已经不再担心这个问题,并且使用jConfirm。