Skip to main content

Bug Tracker

Side navigation

Ticket #4741: toggle_slow_1.3.2.html
File toggle_slow_1.3.2.html, 4.6 KB (added by JonBrunt, June 09, 2009 02:16PM UTC)

Slow - 1.3.2

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>jQuery Toggle Performance</title>

    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>

    <script type="text/javascript">
      function toggleColumn() {
        var start = new Date();
        jQuery('.toggle').toggle();
        var end = new Date();
        alert('took ' + (end.getTime()-start.getTime()) + 'ms');
      }
    </script>
  </head>
  <body>

    <a href="javascript:toggleColumn();">toggle</a>

    <table>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
      <tr>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
        <td>foo</td><td class="toggle">bar</td>
      </tr>
    </table>

  </body>
</html>

Download in other formats:

Original Format