| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>Test case for $().toggle() bug in IE8</title> |
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|---|
| 6 | |
|---|
| 7 | <style> |
|---|
| 8 | table, th, td { |
|---|
| 9 | border: 1px solid; |
|---|
| 10 | border-collapse: collapse; |
|---|
| 11 | } |
|---|
| 12 | </style> |
|---|
| 13 | |
|---|
| 14 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> |
|---|
| 15 | <script type="text/javascript"> |
|---|
| 16 | $(function() { |
|---|
| 17 | |
|---|
| 18 | $('a[id^=expand_]').click(function(e) { |
|---|
| 19 | e.preventDefault(); |
|---|
| 20 | |
|---|
| 21 | var eltID = this.id.slice(7); |
|---|
| 22 | $('#' + eltID).toggle(); |
|---|
| 23 | }); |
|---|
| 24 | |
|---|
| 25 | }); |
|---|
| 26 | </script> |
|---|
| 27 | |
|---|
| 28 | </head> |
|---|
| 29 | |
|---|
| 30 | <body> |
|---|
| 31 | |
|---|
| 32 | <p>Click on the link to toggle the #help_row <tr> element</p> |
|---|
| 33 | <table cellspacing="1" cellpadding="0" class="blocCadre cadreView"> |
|---|
| 34 | <tr> |
|---|
| 35 | <th colspan="3">My Awesome Table (<a href="#" id="expand_help_row">Help</a>)</th> |
|---|
| 36 | </tr> |
|---|
| 37 | <tbody> |
|---|
| 38 | <tr id="help_row"> |
|---|
| 39 | <td colspan="3">Lorem ipsum dolor sit amet...</td> |
|---|
| 40 | </tr> |
|---|
| 41 | <tr><td>One</td><td>Two</td><td>Three</td></tr> |
|---|
| 42 | <tr><td>One</td><td>Two</td><td>Three</td></tr> |
|---|
| 43 | <tr><td>One</td><td>Two</td><td>Three</td></tr> |
|---|
| 44 | </tbody> |
|---|
| 45 | </table> |
|---|
| 46 | |
|---|
| 47 | </body> |
|---|
| 48 | </html> |
|---|