嗨什么是错在这里我的代码:
当我将鼠标悬停在#open #pull_down_content应该从页头中向下移动;当我从#open搬走应该移回。 但是,当我一旦测试代码的页面加载#pull_down_content我之前向下移动屏幕,即使在它悬停。
$(function() {
//Open on hover
$('#open').hover((function(){
$('#pull_down_content').animate({'top':'-0px'},1000);
})
//Close when not hovered
(function(){
$('#pull_down_content').animate({'top':'-340px'},1000);
})
});
);