| 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 | <link rel="stylesheet" type="text/css" href="slowcss.php?t=1" />
|
|---|
| 6 | <script type="text/javascript" src="../jquery.test.js"></script>
|
|---|
| 7 | <script type="text/javascript">
|
|---|
| 8 | $(function () {
|
|---|
| 9 | $("button:first").click(function () {
|
|---|
| 10 | $("#cdiv").text("current width = " + $("#tester").css("width"));
|
|---|
| 11 | });
|
|---|
| 12 | $("#adiv").text("ready width = " + $("#tester").css("width"));
|
|---|
| 13 | });
|
|---|
| 14 | window.onload = function () {
|
|---|
| 15 | $("#bdiv").text("onload width = " + $("#tester").css("width"));
|
|---|
| 16 | };
|
|---|
| 17 | </script>
|
|---|
| 18 | </head>
|
|---|
| 19 | <body>
|
|---|
| 20 | <button>Click to show current width</button>
|
|---|
| 21 | <div id="tester">This div has a 100px width set in external CSS file</div>
|
|---|
| 22 | <div id="adiv"></div>
|
|---|
| 23 | <div id="bdiv"></div>
|
|---|
| 24 | <div id="cdiv"></div>
|
|---|
| 25 | </body>
|
|---|
| 26 | </html>
|
|---|