"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<script src="jquery-1.6.2.js"></script>
<script>
$("#test").live("click", function(){
alert('');
});
$("#tbl").live("mouseover",function(){
$("#title").html('<input id="test" type="button" value="test button" />');
});
$("#tbl").live("mouseleave",function(){
$("#title").html('');
});
</script>
</head>
<body>
<table id='tbl' width="200" border="1">
<tr>
<td id="title"> </td>
</tr>
<tr>
<td id="content"> </td>
</tr>
</table>
</body>
</html>
$(“#test”).live(“click”…) doesn’t work, but if I change to mouseover it works.
Any one can help?
Thanks,
Cheng
Your problem is that you are using mouseover instead of mouseenter. I have a working example here.