【发布时间】:2026-01-13 22:15:01
【问题描述】:
我有这个脚本:
$('#tooncart').click(function() {
$('#top-cart').slideToggle('fast');
return false;
});
我需要将鼠标悬停在#tooncart 上,#top-cart 需要淡入。 当我将光标从#tooncart 移动时,#top-cart 需要保持可见。 当我再次单击#tooncart 并单击具有类.closure 的某个div(位于#top-cart 中)时,它需要再次淡出。
我认为它需要看起来像这样:
$('#tooncart').hover(function() {
$('#top-cart').fadeIn('slow');
// when click on #tooncard or .closing then fade out!
// when directly hover on the #tooncart I think it shouldn't be visible.
});
可能是这样的:
$('.close').click(function() { $(this).parent().fadeOut();
谁能帮帮我?
【问题讨论】: