dream518518518 2012-04-20 08:59
浏览 47
已采纳

传递变量点击功能jquery容易确认[复制]

Possible Duplicate:
How pass variable in jquery easy confirm

Pass variable to click function jquery easy confirm

By using javascript confim i have done suspending. Now i want to turn this to jquery easy confirm how can i do this

My PHP Code ( this function is called in a loop ):

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 easy confirm link: http://projectshadowlight.org/jquery-easy-confirm-dialog/

I have tried like this but if click on 'yes' i want pass '$id' to it. So that i can suspend row.

Please help me out

$("#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);
                }
                });
            });
});
  • 写回答

1条回答 默认 最新

  • doujuan9698 2012-04-26 10:57
    关注

    I have tried example about jquery easy confirm in local system found bug in it. So i have stopped worry about this question and used jConfirm.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?