我正在创建一个悬停在按钮上,一旦悬停它将在我的幻灯片上滚动到不真实的更多内容,但是当我将鼠标悬停在按钮上时它会拉起但不会再回来。
Click here to see live, hover over Contact Our Team Button on slider
jQuery(".buttontwo").hover(
function(e){
jQuery('.buttontwo').animate({top:'0px', bottom:'auto'}, 200)
},
function(e){
jQuery('.buttontwo').animate({bottom:'75px', top:'auto'}, 200)
}
);
任何想法的人?
由于
答案 0 :(得分:1)
尝试在第二个top
中为function()
属性添加固定值。
但是你应该知道,只要你悬停按钮并且动画开始,第二个功能就会被触发,因为你不再将鼠标悬停在按钮上。
您可能需要找到一种不同的动画方式,可能会在按钮的容器中添加onMouseEnter
/ onMouseLeave
事件。