Bug Tracker

Ticket #4741: toggle_fast_1.3.1.html

File toggle_fast_1.3.1.html, 4.6 KB (added by JonBrunt, 12 years ago)

Fast - 1.3.1

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3<html>
4  <head>
5    <title>jQuery Toggle Performance</title>
6
7    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js"></script>
8
9    <script type="text/javascript">
10      function toggleColumn() {
11        var start = new Date();
12        jQuery('.toggle').toggle();
13        var end = new Date();
14        alert('took ' + (end.getTime()-start.getTime()) + 'ms');
15      }
16    </script>
17  </head>
18  <body>
19
20    <a href="javascript:toggleColumn();">toggle</a>
21
22    <table>
23      <tr>
24        <td>foo</td><td class="toggle">bar</td>
25        <td>foo</td><td class="toggle">bar</td>
26        <td>foo</td><td class="toggle">bar</td>
27        <td>foo</td><td class="toggle">bar</td>
28        <td>foo</td><td class="toggle">bar</td>
29        <td>foo</td><td class="toggle">bar</td>
30        <td>foo</td><td class="toggle">bar</td>
31        <td>foo</td><td class="toggle">bar</td>
32      </tr>
33      <tr>
34        <td>foo</td><td class="toggle">bar</td>
35        <td>foo</td><td class="toggle">bar</td>
36        <td>foo</td><td class="toggle">bar</td>
37        <td>foo</td><td class="toggle">bar</td>
38        <td>foo</td><td class="toggle">bar</td>
39        <td>foo</td><td class="toggle">bar</td>
40        <td>foo</td><td class="toggle">bar</td>
41        <td>foo</td><td class="toggle">bar</td>
42      </tr>
43      <tr>
44        <td>foo</td><td class="toggle">bar</td>
45        <td>foo</td><td class="toggle">bar</td>
46        <td>foo</td><td class="toggle">bar</td>
47        <td>foo</td><td class="toggle">bar</td>
48        <td>foo</td><td class="toggle">bar</td>
49        <td>foo</td><td class="toggle">bar</td>
50        <td>foo</td><td class="toggle">bar</td>
51        <td>foo</td><td class="toggle">bar</td>
52      </tr>
53      <tr>
54        <td>foo</td><td class="toggle">bar</td>
55        <td>foo</td><td class="toggle">bar</td>
56        <td>foo</td><td class="toggle">bar</td>
57        <td>foo</td><td class="toggle">bar</td>
58        <td>foo</td><td class="toggle">bar</td>
59        <td>foo</td><td class="toggle">bar</td>
60        <td>foo</td><td class="toggle">bar</td>
61        <td>foo</td><td class="toggle">bar</td>
62      </tr>
63      <tr>
64        <td>foo</td><td class="toggle">bar</td>
65        <td>foo</td><td class="toggle">bar</td>
66        <td>foo</td><td class="toggle">bar</td>
67        <td>foo</td><td class="toggle">bar</td>
68        <td>foo</td><td class="toggle">bar</td>
69        <td>foo</td><td class="toggle">bar</td>
70        <td>foo</td><td class="toggle">bar</td>
71        <td>foo</td><td class="toggle">bar</td>
72      </tr>
73      <tr>
74        <td>foo</td><td class="toggle">bar</td>
75        <td>foo</td><td class="toggle">bar</td>
76        <td>foo</td><td class="toggle">bar</td>
77        <td>foo</td><td class="toggle">bar</td>
78        <td>foo</td><td class="toggle">bar</td>
79        <td>foo</td><td class="toggle">bar</td>
80        <td>foo</td><td class="toggle">bar</td>
81        <td>foo</td><td class="toggle">bar</td>
82      </tr>
83      <tr>
84        <td>foo</td><td class="toggle">bar</td>
85        <td>foo</td><td class="toggle">bar</td>
86        <td>foo</td><td class="toggle">bar</td>
87        <td>foo</td><td class="toggle">bar</td>
88        <td>foo</td><td class="toggle">bar</td>
89        <td>foo</td><td class="toggle">bar</td>
90        <td>foo</td><td class="toggle">bar</td>
91        <td>foo</td><td class="toggle">bar</td>
92      </tr>
93      <tr>
94        <td>foo</td><td class="toggle">bar</td>
95        <td>foo</td><td class="toggle">bar</td>
96        <td>foo</td><td class="toggle">bar</td>
97        <td>foo</td><td class="toggle">bar</td>
98        <td>foo</td><td class="toggle">bar</td>
99        <td>foo</td><td class="toggle">bar</td>
100        <td>foo</td><td class="toggle">bar</td>
101        <td>foo</td><td class="toggle">bar</td>
102      </tr>
103      <tr>
104        <td>foo</td><td class="toggle">bar</td>
105        <td>foo</td><td class="toggle">bar</td>
106        <td>foo</td><td class="toggle">bar</td>
107        <td>foo</td><td class="toggle">bar</td>
108        <td>foo</td><td class="toggle">bar</td>
109        <td>foo</td><td class="toggle">bar</td>
110        <td>foo</td><td class="toggle">bar</td>
111        <td>foo</td><td class="toggle">bar</td>
112      </tr>
113      <tr>
114        <td>foo</td><td class="toggle">bar</td>
115        <td>foo</td><td class="toggle">bar</td>
116        <td>foo</td><td class="toggle">bar</td>
117        <td>foo</td><td class="toggle">bar</td>
118        <td>foo</td><td class="toggle">bar</td>
119        <td>foo</td><td class="toggle">bar</td>
120        <td>foo</td><td class="toggle">bar</td>
121        <td>foo</td><td class="toggle">bar</td>
122      </tr>
123    </table>
124
125  </body>
126</html>