2011-05-27 79 views
0

我的所有代码工作正常。我在脚本中实现了jquery的淡出效果,但是此函数不起作用,但不起作用.hide(),而不是fadeto()。请帮帮我。非常感谢。淡入淡出不工作jquery

$(function() { 
    $("#slider").slider({ 
     stop: function(event, ui) { 
      $("#list").fadeTo("fast", 0.03); 
       $.ajax({ 
       url: "search.php", 
       cache: false, 
       async: false, 
      data: "", 
        success: function(html){ 
       $("#list").fadeTo("fast", 1); 
       $("#list").html(html); 

       } 
      }); 

     } 
    }); 
}); 

我点击显示简单的HTML表格。这里是我的表

<table cellpadding="2" cellspacing="2" border="0" width="500px"> 
    <tr class="title"> 
     <td align="center" width="10%" bgcolor="#CCCCCC">Shape</td> 
     <td align="center" width="11%"bgcolor="#CCCCCC">Weight</td> 
     <td align="center" width="11%"bgcolor="#CCCCCC">Certificate</td> 
     <td align="center" width="12%"bgcolor="#CCCCCC">Cut</td> 
     <td align="center" width="10%"bgcolor="#CCCCCC">Color</td> 
     <td align="center" width="10%"bgcolor="#CCCCCC">Clarity</td> 
     <td align="center" width="12%"bgcolor="#CCCCCC">Price</td> 
     <td align="center" width="12%"bgcolor="#CCCCCC">View Detail</td> 

    </tr> 
    <tr> 
     <td align="center" width="10%">&nbsp;</td> 
     <td align="center" width="11%">&nbsp;</td> 
     <td align="center" width="12%">&nbsp;</td> 
     <td align="center" width="10%">&nbsp;</td> 
     <td align="center" width="10%">&nbsp;</td> 
     <td align="center" width="12%">&nbsp;</td> 
     <td align="center" width="12%">&nbsp;</td> 
    </tr> 
</table> 
+0

你能告诉我们你的HTML – 2011-05-27 07:31:49

+0

什么浏览器您使用? – silex 2011-05-27 07:58:39

+0

@silex firefox,chrome,即 – 2011-05-27 08:34:04

回答

0

如果你想淡入/淡出表。你的桌子上没有ID!

<table cellpadding="2" cellspacing="2" border="0" width="500px"> 

应该

<table id="list" cellpadding="2" cellspacing="2" border="0" width="500px">