我試圖創建一個「購物車」鏈接,其中購物車在懸停時打開。我可以讓車在懸停時開出,並在離開時關閉。然而,我無法讓購物車塊在懸停後保持打開狀態。如果您將鼠標懸停在其上,我希望汽車座椅在懸停時打開並保持打開狀態。如果您將鼠標懸停在此頁面右上角的「購物車」鏈接上,您會看到我的意思。jquery懸停並保持到鼠標移出
http://dl.dropbox.com/u/4380589/Rococlothing/index.html
的我使用jQuery是:
jQuery('#cart-links .links .first a').mouseover(function(){
jQuery('.block-cart').slideDown(400);
}).mouseout(function(){
jQuery('.block-cart').slideUp(400);
});
jQuery(".block-cart").mouseover(function(){
jQuery(this).show();
}).mouseout(function(){
jQuery(this).fadeOut("slow");
});
http://jsfiddle.net/kongr45gpen/K55ct/1/ – kongr45gpen 2011-06-14 14:34:45