2013-05-10 47 views
-2

所以我正在製作一個超過here的投資組合網站,並且由於某些原因,每當我嘗試將onmouseover事件附加到任何圖標時,什麼也沒有發生,我試圖讓我的名字文本淡入名稱你懸停的圖標,當你離開時淡出,有什麼辦法可以做到這一點?我試圖約十「解決方案」onmouseover();不工作?

感謝

+0

你的代碼是什麼樣的?你嘗試過哪10種解決方案,這對我們推薦你已經嘗試過的東西沒有好處。 – eidsonator 2013-05-10 02:33:44

回答

0
<td onclick="move('url');" onmouseover="alert();" class="tile" id="portfolio"></td> 
0

我在您的網站注意到您加載jQuery的,所以我想給你一個使用jQuery的,即使它不是在你的標籤

中列出的答案
$("#about").mouseover(function(){ //When the mouse enters 
    $("span.text").fadeOut("slow",function(){ 
     //After your name has fadedOut switch the text and fadeIn 
     $("span.text").html("About"); 
     $("span.text").fadeIn("slow"); 
    }); 
}).mouseout(function(){ //When the mouse leaves 
    $("span.text").fadeOut("slow",function(){ 
     //After "about" has fadedOut switch with your name and fadeIn 
     $("span.text").html("Matthew Foulks"); 
     $("span.text").fadeIn("slow"); 
    }); 
}); 

希望這會有所幫助。詢問你是否對此有任何疑問。