I have a main.php inside which another page (page1.php) is being called embedded in a div.
I am dynamically updating the a table in page1 when the page1.php is loaded.
Now when I call a function on the click event of the table the function is called but the control doesn't enters in the click event of the table which I have called inside the function.
However clicking the second time onwards the control enters and works fine.
Following is the function in the js file
function highlight_table()
{
$(#table tr).click(function(){
alert("here");
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…