like this
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</head>
<body>
<div id="test">321</div>
</body>
<script>
$(document).ready(function(){
$("#test").click(function(){
$.ajax({
url:"http://address/",
type:"post",
data:{id:"123"},
success: function(r)
{
$("#test").after(r); // it will return <div id="test2">123</div>
}
});
return false;
});
$("#test2").click(function(){
alert('123');
return false;
});
});
</script>
</html>
first click #test and insert #test2 then i click #test2, it can't to get click event, help me, what's problem