| 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
|---|
| 3 | "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd" > |
|---|
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fi"> |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | <head> |
|---|
| 9 | <title>JQuery 1.2.6 - $(window).height() bug in Opera 9.5</title> |
|---|
| 10 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|---|
| 11 | |
|---|
| 12 | <script type="text/javascript" |
|---|
| 13 | src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> |
|---|
| 14 | |
|---|
| 15 | <script type="text/javascript" > |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | test = function(){ |
|---|
| 19 | $("#info").text( $(window).height() + ". It should be " + window.innerHeight + "!"); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | $(document).ready(function() { |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | $("#info").after("<p>" + navigator.userAgent + "</p>" ); |
|---|
| 26 | |
|---|
| 27 | test(); |
|---|
| 28 | $(window).resize( test ); |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | }); |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | </script> |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | </head> |
|---|
| 41 | <body> |
|---|
| 42 | <div id="main"> |
|---|
| 43 | |
|---|
| 44 | <h1>JQuery 1.2.6 - $(window).height() bug in Opera 9.5</h1> |
|---|
| 45 | <p>The return value of <strong>$(window).height()</strong> is wrong in Opera 9.5. Compare to Opera 9.2 or Firefox. <a href="http://www.pithill.org/kuvat/opera9.5_jquerybug.png" >Here's a screenshot</a>.</p> |
|---|
| 46 | <p> |
|---|
| 47 | The value is now <strong id="info"></strong> |
|---|
| 48 | </p> |
|---|
| 49 | |
|---|
| 50 | </div> |
|---|
| 51 | </body> |
|---|
| 52 | </html> |
|---|
| 53 | |
|---|