2013-09-27 115 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(); 
     });  
} 
相關問題