jqModal 和实时查询 (R14)

发布于 2024-07-27 03:40:33 字数 658 浏览 11 评论 0原文

我有一个动态创建的表格,我试图在单击图像时附加模态效果,但遇到了麻烦。 由于表中的行是动态的,因此我使用“实时”功能。 用户第一次单击图像时,模式会正常弹出,但下次单击时它不起作用。 我认为使用 jqModal 在第一次初始化后重新初始化 jqm 的所有尝试都只会更新参数。 我收到的错误是 $("#divModal").jqm 不是函数

这是到目前为止我所拥有的代码

<'img link=add_product.php?id=X src=./images/icons/pencil.png class=img_pencil id=imgPencil_'.$aRow['product_id'].'>

$(".img_pencil").live("click", function(){
    $('#divModal').jqm({ajax: 'add_product.php?id=XXXX'});
    $('#divModal').jqmShow();
    return false; // have tried with and without this
});

我还尝试使用 $('#jqModal').jqm({ajax :'@href'}),但是当我尝试这样做时没有任何反应。

有任何想法吗? 我希望我对我的问题的解释足够清楚......

I have a dynamically created table that I am trying to attach a modal effect when an image is clicked and am having trouble. Since the rows in the table are dynamic, I am using the "live" feature. The first time that the user clicks on the image, the modal pops up fine, but on the next click it does not work. I thought that with jqModal all attempts to reinitialize jqm after the first initialization would just update the parameters. The error that I am getting is $("#divModal").jqm is not a function

Here is the code that I have so far

<'img link=add_product.php?id=X src=./images/icons/pencil.png class=img_pencil id=imgPencil_'.$aRow['product_id'].'>

$(".img_pencil").live("click", function(){
    $('#divModal').jqm({ajax: 'add_product.php?id=XXXX'});
    $('#divModal').jqmShow();
    return false; // have tried with and without this
});

I have also tried to pass the link using $('#jqModal').jqm({ajax:'@href'}), but nothing happens when I tried that.

Any ideas? I hope I am clear enough in my explanation of my problem....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

a√萤火虫的光℡ 2024-08-03 03:40:33

我让实时查询工作的方式是将作业和事件分开,IE。

$('#divModal').jqm({ajax: 'add_product.php?id=XXXX'});

$(".img_pencil").live("click", function(e){
    e.preventDefault();  
    $('#divModal').jqmShow(this);
});

The way that I got my live query to work, it I split up the assignment and event, IE.

$('#divModal').jqm({ajax: 'add_product.php?id=XXXX'});

$(".img_pencil").live("click", function(e){
    e.preventDefault();  
    $('#divModal').jqmShow(this);
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文