当我将鼠标悬停在滑块上时,我正在尝试显示导航栏。导航栏位于其中,如您所见:
http://jsfiddle.net/warface/GhY3R/2/
当鼠标悬停在导航栏上时,如何避免这个小故障?
$(function(){
/* Slider nav mouseover thingy*/
$('#slider').mouseenter(function(e){
$('.portfolio nav').show();
});
$('#slider').mouseleave(function(e){
$('.portfolio nav').hide();
});
});
<div class="portfolio">
<div id="slider"></div>
<nav>
<a class="next" data-slider="slider" rel="next">▶</a>
<a class="prev" data-slider="slider" rel="prev">◀</a>
</nav>
</div>
答案 0 :(得分:1)
请参阅:Fiddle
$(function(){
/* Slider nav mouseover thing*/
$('#slider,nav').mouseenter(function(e){
$('.portfolio nav').show();
});
$('#slider').mouseleave(function(e){
$('.portfolio nav').hide();
});
});