Question

"MyParentPage.htm" uses the load function of jquery to load('myDiv.htm') //

myDiv.htm only contains:

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

I have the following in "MyParentPage.htm"

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

Why is the my alert not being hit

Was it helpful?

Solution

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

See live

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top