2013-03-13 65 views
0

我試圖顯示導航欄時,我將鼠標放在滑塊上。導航欄裏面,你可以在這裏看到:鼠標懸停的Mouseenter兒童閃光燈

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> 

回答

1

看到這個:Fiddle

$(function(){  
    /* Slider nav mouseover thing*/ 
    $('#slider,nav').mouseenter(function(e){ 
    $('.portfolio nav').show(); 
    }); 
    $('#slider').mouseleave(function(e){ 
    $('.portfolio nav').hide(); 
    }); 
}); 
+0

洛爾這麼簡單..謝謝 – Warface 2013-03-13 19:16:26

+0

@Warface,歡迎.. – Anujith 2013-03-13 19:17:08