$("#btn1").on("click", function() { $("#block2").load("somepage.html", function() { $("#btn2").on("click", function() { alert("yes"); }); }); });