0
success: function(html){
    var halfh = html.height;
    $('#contact_'+id).show();
    $('#contact_'+id).css({'width':'90%'}).animate({
        opacity: '0.6',
        height: halfh
    }, 500 ,'linear').animate({
        opacity: '1',
    },500,'linear',function(){  <--- Error on this line
        $(this).html(html.content)
    });

注:次のようにすべてを二重引用符に変更しました:

    opacity: "0.6",
    height: halfh
}, 500 ,"linear").animate({
    opacity:"1",
},500,"linear",function(){

しかし、まだ同じエラー:(

助けてください。よろしく

4

3 に答える 3

2

@soderslatt がコメントに書いたように、間違ったコンマがあります。それを削除し、コードを少し最適化しました。

success: function(html){
    $('#contact_' + id).show().css({'width': '90%'}).animate({
            opacity: 0.6,
            height: html.height
          }, 500, 'linear').animate({
             opacity: 1
          }, 500, 'linear', function() {
              $(this).html(html.content);
          });
}
于 2012-12-03T16:03:13.727 に答える
2

私の前のコメントのように。末尾にコンマがあります。

opacity:"0.6",
        height: halfh
      }, 500 ,"linear").animate({
         opacity:"1"
      },500,"linear",function(){
于 2012-12-03T16:07:46.430 に答える
1
}, 500 ,'linear').animate({
   opacity:'1',  <---  Remove this comma
},500,'linear',function(){
于 2012-12-03T16:06:34.317 に答える