2013-09-27 74 views
0

我已经得到了这个脚本,我一直在努力,我需要它淡入,并通过它的高度向上移动。如果我删除.animate()它会淡入,所以我猜那里有错误。如何动画一个div出现并移动到另一个div上

function showDesc(){ 
    $(".container-box").hover(function(){ 
     $(this).find(".contain-desc").fadeIn('slow').animate({ 
      'bottom':'130px' 
     }, {duration: 'slow', queue: false;} 
    },function(){ 
     $(this).find(".contain-desc").fadeOut(); 
    });   
} 

我必须使用的onmouseover的老式方法=“”在HTML和下面是我完整的代码,到目前为止,谢谢。

http://jsfiddle.net/silverlight513/KuJkY/

回答

2

的错误是在这里:

{duration: 'slow', queue: false;}

您已经终止与分号(;

改变它的声明:

{duration: 'slow', queue: false}

编辑:

在你的代码中有更多的错误。我已更新功能:

function showDesc(){ 
    $(".container-box").hover(function(){ 
     $(this).find(".contain-desc").fadeIn('slow').animate({ 
      'bottom':'130px' 
     }, {duration: 'slow', queue: false});//This was not closed 
    },function(){ 
     $(this).find(".contain-desc").fadeOut(); 
     });  
} 
相关问题