我有jQuery的問題。我創建了一個功能.click
的菜單,但現在我需要在懸停菜單中轉換此菜單,當我點擊鏈接COLLECTIONS時。jQuery從點擊變爲懸停
這是jQuery代碼:
$(document).ready(function(){
$("div#toggle a.button").click(function() {
$("div#toggle div.box").toggle("slow");
});
hidden = true;
$("div#custom a.button").hover(function() {
if(hidden == false) {
$("div#custom div.box").fadeOut();
hidden = true;
} else {
$("div#custom div.box").fadeIn(100);
hidden = false;
}
});
這是CSS代碼:
#custom {
z-index:0;
}
.box {
width:100%;
height:20px;
border:0px solid #999;
background-color:rgb(128, 129, 132);
display:none;
position:fixed;
left:0;
margin-top:6px;
z-index:0;
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
color:#E6E4D7;
}
的頁面是在http://www.mediaxsrl.it/web/loloey/forme/formeit.html
和你的問題是什麼? – povilasp
有一種方法可以在不改變css的情況下適應jquery代碼? –
任何人都可以解決這個問題? –