Orbit ZURB jquery fade in/fade out navigation button on mouseover

可紊 提交于 2019-12-12 02:04:13

问题


I'm using the jQuery image slider plugin - Orbit. I'm trying to show/hide navigation buttons on mouseover/mouseout. Somehow I managed to do so: http://jsfiddle.net/sherlock85/mZYX9/15/ But when you move your mouse cursor over a navigation button it blinks and it doesn't change the slide.

I would appreciate any help.


回答1:


Use the following code. You have to add div.slider-nav for hover:

$("#featured, div.slider-nav").hover(function(){
  $("div.slider-nav").css({display:'block'});
}, function() {
  $("div.slider-nav").css({display:'none'});
});

The layer of .slider-nav is located over the #featured layer. You will lost the focus to #featured when the mouse enters .slider-nav and it get's the property display:none. After that the focus is now over #featured again and the property is set to display:block. It looks like fast blinking because this will be repeated every time you move your mouse.



来源:https://stackoverflow.com/questions/7260941/orbit-zurb-jquery-fade-in-fade-out-navigation-button-on-mouseover

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!