2014-01-06 26 views
-3

訪問http://voorwaartsmarscoaching.nl/。點擊4個大立方體中的1個。 4個立方體將變小並移動到標題。在MouseOver上的一個小立方體中,您將在立方體的右側看到一個文本。該文本對於活動屏幕必須保持可見。需要對網站進行小的調整 - MouseOver和可見性

示例:如果訪問者正在訪問「聯繫人&參考資料」,則小方塊右側的文本「Contact &參考資料」必須始終保持可見。

請幫助

JS

$(".cube").mouseenter(function(){ 
if($(this).data("status") == "tiny") { 
infoId = $(this).attr("id"); 
$('#info-' + infoId).fadeIn('slow'); 
} 
}); 

$(".cube").mouseleave(function(){ 
    if($(this).data("status") == "tiny") { 
    infoId = $(this).attr("id"); 
    $('#info-' + infoId).show(); 
    } 
}); 
+0

是前4立方體應該是均勻分佈在頂部? 每個工具提示出現在箱子的後面,因此無法正確看到,用Z-index索引推動它頂部? – AlexHighHigh

+0

你在css中使用z-index嗎?或者在顯示文本的時候嘗試隱藏多維數據集? 有些來源可能會有所幫助。 – Lexib0y

+0

請修復盒子位置,它顯示了mozilla和chrom中的不同位置。 –

回答

0

嘗試下面的代碼在你的代碼:

JS

$(document).on("click", ".cube", function() { 
       var infoId = $(this).attr("id"); 
       $('#info-' + infoId).show(); 
}); 
+0

我需要這樣的智能手機。你能幫我嗎 ? – Developer

+0

該網站的響應式設計......? t – Manoj

+0

是的,它是敏感的設計 – Developer