“MyParentPage.htm” 使用的jquery的负载功能,负载( 'myDiv.htm')//

myDiv.htm只包含:

<a href="#" class="bt-cbox">Click me</a>

我在 “MyParentPage.htm” 以下

$(document).ready(function() {    
    $(".bt-cbox").click(function() {    
        alert("handler hit");
    });
});

为什么我的警惕不被击中

有帮助吗?

解决方案

$(document).ready(function() {
    $(".bt-cbox").live("click",function() {
        alert("handler hit");
    });
});

请参阅

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top