Bug Tracker

Ticket #2505: jquery_test.html

File jquery_test.html, 803 bytes (added by davidserduke, 14 years ago)

test case based on description

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3  <head>
4    <title>Tester</title>
5    <style type="text/css">
6      .table-headng { background:yellow; }
7    </style>
8    <script type="text/javascript" src="../jquery.js"></script>
9    <script type="text/javascript">
10      $(function () {
11        $("button:first").click(function () {
12              $('th').parent().addClass('table-headng'); 
13              var s = "added new class...";
14              $("#adiv").text(s);
15            });
16      });
17    </script>
18  </head>
19  <body>
20    <button>Do It</button>
21<table border = "1">
22<tr>
23<th>Header 1</th>
24<th>Header 2</th>
25</tr>
26<tr>
27<td>Cell A</td>
28<td>Cell B</td>
29</tr>
30</table>
31   <div id="adiv"></div>
32  </body>
33</html>