後,我有HTML表是這樣的:Jquery的的mouseenter不火HTML變化
<div id="recommendation">
<table id="category_selected">
<tr>
<td>1</td>
</tr>
</table>
</div>
和jQuery這樣的:
$(function()
{
$("#recommendation tr").mouseenter(function()
{
alert("Yes");
}
}
,一切工作正常。但是,當我改變推薦的HTML這個:
$.post("path/script.php", {dataIn: dataInEncoded}, function(data, status)
{
if(status == 'success')
{
$("#recommendation").html(data);
/*(data exactly the same as default html)
<table id="category_selected">
<tr>
<td>1</td>
</tr>
</table>
*/
}
}
jquery鼠標突然不起作用(觸發)。
什麼是你在你的Ajax請求所得到的迴應? – mrid