我有一個表,我創建的飛行行:具有懸停幫助.live
$('#AjaxResultTable > tbody:last').append('<tr class="row"><td class="expandResult" title="Click to expand/collapse">+</td>' + id + name + suburb + state + zip + '</tr>').hide().fadeIn(200);
我想改變行的背景顏色,當我將鼠標懸停在他們改變回來時,我不是。
我試着用
$('#AjaxResultTable tr').hover(function() {
$(this).css('background-color', '#f5f5f5');
}, function() {
$(this).css('background-color', '#fff');
});
,但沒有工作,所以我試圖用
$('#AjaxResultTable tr').live('hover', function() {
$(this).css('background-color', '#f5f5f5');
}, function() {
$(this).css('background-color', '#fff');
});
當我將鼠標懸停在一排它改變背景顏色,但它不會更改回當我不是白色的時候變成白色。
有什麼建議嗎?
在此先感謝。
非常感謝 – Roger 2011-05-31 12:58:37