2011-04-22 76 views
0

我使用下面的jQuery來改變一堆時,他們的父母在將鼠標懸停在圖片後切換回他們。我在Mac上,所以我沒有測試Firefox的Firefox,但即使IE在這裏工作,這是一個系統的衝擊。任何人都知道爲什麼這不適用於Firefox?它拋出沒有錯誤,但什麼都不做。Jquery的:鼠標懸停事件的一切工作,但火狐

 $('.swfselector').live('mouseover mouseout', function() { 
    if (event.type == 'mouseover') { 
      $(this).find('.tab').each(function() { 
       $(this).attr("src", 
       $(this).attr("src").replace(".png", "o.png")); 
      }) 
    } else { 
      $(this).find('.tab').each(function() { 
       $(this).attr("src", 
       $(this).attr("src").replace("o.png", ".png")); 
      }) 
     } 
    }); 

回答

3

嘗試:

$('.swfselector').live('mouseover mouseout', function(event) { 
+0

乾杯隊友,傳奇! – 2011-04-22 09:29:35