我有一个div,我绑定了jQuery悬停事件,以使用slidetoggle激活slideDown:
<div class="Square"> <div class="RedSquare"></div> <div class="GraySquare"></div> </div> $("div.RedSquare").hover( function() { $(this).siblings("div.GraySquare").slidetoggle("fast"); },function() { $(this).siblings("div.GraySquare").slidetoggle("fast"); } );
它在它下面切换一个div’.GraySquare’.基本上从灰色框中滑下灰色框.我面临的问题是当鼠标在灰色div上移动时,幻灯片会向上移动.我希望它悬停在红色或灰色方块上时保持不动.
任何帮助表示赞赏.