【发布时间】:2011-08-11 16:42:16
【问题描述】:
我有这个 NyroModal:
$('.openModal').nyroModal();
然后我有我的链接:
<a href="#sample" class="openModal">this is a test</a>
这很好用,它会按预期加载我的示例模式,但是当我使用
添加链接时$("#mydiv").html('<a href="#sample" class="openModal">this is a test</a>');
不行,我试过了
$('.openModal a').live('click',function(e) {
e.preventDefault();
$(this).nyroModalManual();
return false;
});
还有这个:
$('.openModal a').live('click',function(e) {
e.preventDefault();
$(this).nmManual("#sample");
return false;
});
但我没有任何运气,你能想出其他我可以尝试的方法吗?我做错了什么?
谢谢!
更新:我忘了说我的控制台没有任何错误
更新 2:我现在收到此错误,现在我选择正确:
Uncaught TypeError: Object [object Object] has no method 'nyroModalManual'
【问题讨论】:
标签: javascript jquery nyromodal jquery-click-event