如何让slideDown在桌面上工作?

时间:2021-02-28 17:29:52

I cannot get the jQuery slideDown function to work on <table> elements. They just appear, without any animation. How can this be resolved?

我无法使用jQuery slideDown函数来处理

元素。他们只是出现,没有任何动画。怎么解决这个问题?

Here is an example...

这是一个例子......

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Test</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
      $(function() {
        setTimeout(function() {
          $("#tblTest").slideDown(2500);
        }, 500);
      });
    </script>
  </head>
  <body>
    <table cellpadding="2" cellspacing="0" border="1" id="tblTest" style="display:none">
      <thead>
        <tr>
          <th class="nosort">
            <h3>ID</h3>
          </th>
          <th>
            <h3>Name</h3>
          </th>
          <th>
            <h3>Phone</h3>
          </th>
          <th>
            <h3>Email</h3>
          </th>
          <th>
            <h3>Zip</h3>
          </th>
          <th>
            <h3>Birthdate</h3>
          </th>
          <th>
            <h3>Last Access</h3>
          </th>
          <th>
            <h3>Rating</h3>
          </th>
          <th>
            <h3>Done</h3>
          </th>
          <th>
            <h3>Salary</h3>
          </th>
          <th>
            <h3>Score</h3>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>1</td>
          <td>Ezekiel Hart</td>
          <td>(627) 536-4760</td>
          <td>
            <a href="mailto:#">tortor@est.ca</a>
          </td>
          <td>53082</td>
          <td>12/02/1962</td>
          <td>March 26, 2009</td>
          <td>-7</td>
          <td>7%</td>
          <td>$73,229</td>
          <td>6.9</td>
        </tr>
        <tr>
          <td>2</td>
          <td>Jaquelyn Pace</td>
          <td>(921) 943-5780</td>
          <td>
            <a href="mailto:#">in@elementum.org</a>
          </td>
          <td>46789</td>
          <td>06/03/1957</td>
          <td>October 20, 2006</td>
          <td>-7</td>
          <td>33%</td>
          <td>$130,752</td>
          <td>4.9</td>
        </tr>
        <tr>
          <td>3</td>
          <td>Lois Pickett</td>
          <td>(835) 361-5993</td>
          <td>
            <a href="mailto:#">arcu.ac@disse.ca</a>
          </td>
          <td>9814</td>
          <td>10/15/1983</td>
          <td>June 01, 1999</td>
          <td>4</td>
          <td>44%</td>
          <td>$48,684</td>
          <td>5.5</td>
        </tr>
        <tr>
          <td>4</td>
          <td>Keane Raymond</td>
          <td>(605) 803-1561</td>
          <td>
            <a href="mailto:#">at.risus.Nunc@ipsum.com</a>
          </td>
          <td>97129</td>
          <td>07/30/1982</td>
          <td>July 24, 1996</td>
          <td>5</td>
          <td>20%</td>
          <td>$7,023</td>
          <td>9.5</td>
        </tr>
        <tr>
          <td>5</td>
          <td>Porter Thomas</td>
          <td>(666) 569-9894</td>
          <td>
            <a href="mailto:#">non@Proin.ca</a>
          </td>
          <td>59953</td>
          <td>09/27/1986</td>
          <td>December 05, 2007</td>
          <td>1</td>
          <td>66%</td>
          <td>$69,875</td>
          <td>0.9</td>
        </tr>
        <tr>
          <td>6</td>
          <td>Imani Murphy</td>
          <td>(771) 294-6690</td>
          <td>
            <a href="mailto:#">Aenean.sed@elit.ca</a>
          </td>
          <td>69771</td>
          <td>10/23/1970</td>
          <td>December 08, 1996</td>
          <td>-1</td>
          <td>30%</td>
          <td>$113,763</td>
          <td>4.9</td>
        </tr>
        <tr>
          <td>7</td>
          <td>Zachery Guthrie</td>
          <td>(851) 784-4129</td>
          <td>
            <a href="mailto:#">nunc.nulla@vel.com</a>
          </td>
          <td>66960</td>
          <td>12/22/1972</td>
          <td>September 20, 2002</td>
          <td>-5</td>
          <td>24%</td>
          <td>$130,248</td>
          <td>6.9</td>
        </tr>
        <tr>
          <td>8</td>
          <td>Harper Bowen</td>
          <td>(810) 652-6704</td>
          <td>
            <a href="mailto:#">dis@duinec.ca</a>
          </td>
          <td>77110</td>
          <td>10/26/1973</td>
          <td>May 29, 1996</td>
          <td>5</td>
          <td>49%</td>
          <td>$73,197</td>
          <td>4.5</td>
        </tr>
        <tr>
          <td>9</td>
          <td>Caldwell Larson</td>
          <td>(850) 562-3177</td>
          <td>
            <a href="mailto:#">elit@dolor.com</a>
          </td>
          <td>87519</td>
          <td>07/20/1985</td>
          <td>June 22, 2004</td>
          <td>-3</td>
          <td>81%</td>
          <td>$63,736</td>
          <td>7.5</td>
        </tr>
        <tr>
          <td>10</td>
          <td>Baker Osborn</td>
          <td>(378) 371-0559</td>
          <td>
            <a href="mailto:#">turpis.Nulla@ac.edu</a>
          </td>
          <td>69446</td>
          <td>03/29/1970</td>
          <td>July 23, 2005</td>
          <td>-7</td>
          <td>61%</td>
          <td>$2,868</td>
          <td>0.1</td>
        </tr>
        <tr>
          <td>11</td>
          <td>Yael Owens</td>
          <td>(465) 520-1801</td>
          <td>
            <a href="mailto:#">nunc.ac.mattis@enim.com</a>
          </td>
          <td>93872</td>
          <td>08/10/1963</td>
          <td>April 09, 1997</td>
          <td>10</td>
          <td>85%</td>
          <td>$126,469</td>
          <td>8.9</td>
        </tr>
        <tr>
          <td>12</td>
          <td>Fletcher Briggs</td>
          <td>(992) 962-9419</td>
          <td>
            <a href="mailto:#">amet.ante@lentesque.edu</a>
          </td>
          <td>87282</td>
          <td>08/12/1971</td>
          <td>December 12, 2006</td>
          <td>7</td>
          <td>23%</td>
          <td>$142,448</td>
          <td>8.9</td>
        </tr>
        <tr>
          <td>13</td>
          <td>Maggy Murphy</td>
          <td>(585) 210-0390</td>
          <td>
            <a href="mailto:#">eu@Integer.com</a>
          </td>
          <td>98081</td>
          <td>07/11/1968</td>
          <td>April 02, 2007</td>
          <td>9</td>
          <td>31%</td>
          <td>$40,267</td>
          <td>6.9</td>
        </tr>
        <tr>
          <td>14</td>
          <td>Maggie Blake</td>
          <td>(489) 101-5447</td>
          <td>
            <a href="mailto:#">rutrum.non.hendrerit@iaculis.org</a>
          </td>
          <td>85131</td>
          <td>04/11/1970</td>
          <td>May 24, 2008</td>
          <td>-2</td>
          <td>32%</td>
          <td>$99,686</td>
          <td>7.9</td>
        </tr>
        <tr>
          <td>15</td>
          <td>Ginger Bell</td>
          <td>(934) 692-7294</td>
          <td>
            <a href="mailto:#">erat.in.conetuer@pedenout.org</a>
          </td>
          <td>78878</td>
          <td>06/10/1957</td>
          <td>April 13, 2003</td>
          <td>-10</td>
          <td>74%</td>
          <td>$112,997</td>
          <td>4.5</td>
        </tr>
        <tr>
          <td>16</td>
          <td>Iliana Ballard</td>
          <td>(806) 835-7035</td>
          <td>
            <a href="mailto:#">vel.sapien@mi.ca</a>
          </td>
          <td>84718</td>
          <td>02/09/1989</td>
          <td>March 27, 1996</td>
          <td>-6</td>
          <td>78%</td>
          <td>$5,282</td>
          <td>5.5</td>
        </tr>
        <tr>
          <td>17</td>
          <td>Alisa Monroe</td>
          <td>(859) 974-4442</td>
          <td>
            <a href="mailto:#">adipiscing.ligula@aretraNam.edu</a>
          </td>
          <td>89057</td>
          <td>02/14/1990</td>
          <td>April 30, 2003</td>
          <td>6</td>
          <td>95%</td>
          <td>$103,999</td>
          <td>5.9</td>
        </tr>
        <tr>
          <td>18</td>
          <td>Kenyon Luna</td>
          <td>(673) 147-0443</td>
          <td>
            <a href="mailto:#">Cras@Vestibulumant.edu</a>
          </td>
          <td>18035</td>
          <td>04/14/1981</td>
          <td>April 17, 2009</td>
          <td>9</td>
          <td>14%</td>
          <td>$37,014</td>
          <td>7.9</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>

1 个解决方案

#1


try wrapping the table in a div and animate the div.

尝试将表包装在div中并为div设置动画。

Josh

#1


try wrapping the table in a div and animate the div.

尝试将表包装在div中并为div设置动画。

Josh