gpt4 book ai didi

javascript - 无法将 jQuery jqModal 分配给动态添加的链接

转载 作者:行者123 更新时间:2023-11-30 18:57:39 24 4
gpt4 key购买 nike

我在让 jqmodal 模式对话框显示在客户端代码动态添加的链接上时遇到了问题。我已经在以下 URL 中演示了该问题:http://www.neil-burton.co.uk/jqmodaltest/index.htm

任何帮助将不胜感激

最佳答案

您可以使用 .live对于 anchor 击事件

再次更新

  $('#dialog').jqm({ajax:'@rel'});

// open the modal whenever anchor links on the page are clicked
$('a.someClass').live('click',function(){
$('#dialog').jqmShow(this);
});

关于javascript - 无法将 jQuery jqModal 分配给动态添加的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1366527/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com