outerWidth(true) retrieve a wrong value on Chrome (ubuntu)
Hello,
I try to get the outerWidth(true) value on a div but I get a wrong value on Chrome 6.0.472.63 (Ubuntu 10.04.1 LTS) with jQuery 1.4.2.
I try my test under a windows XP Chrome version, same problem...
I found a 2 years old open ticket (
#3333), but It's about jQuery 1.2.6.
somebody see what is wrong, my test is really simple...
maybe I need to open a new ticket ?
test:
- <style type="text/css">
- #example1 {
- width: 500px;
- height: 500px;
- position: relative;
- overflow: hidden;
- }
-
- #example1 div.boxes {
- width: 50px;
- height: 50px;
- margin:0;
- padding:0;
- display: block;
- }
- </style>
-
-
- <div id="example1" class="demos">
- <div class="boxes"></div>
- </div>
-
- <script type="text/javascript" src="js/jquery.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
-
- var test = $('div#example1 div.boxes');
-
- /*
- * Chrome 6.0.472.63 (Ubuntu 10.04.1 LTS)
- * and Chrome 6.0.472.63 (Win XP SP3)
- *
- height:50
- outerHeight:50
- outerHeight(true):50
- width:50
- outerWidth:50
- outerWidth(true):500 (wrong value...)
- *
- * Firefox 3.6.10 (Ubuntu 10.04.1 LTS)
- * and IE 8 (Win XP SP3)
- *
- height:50
- outerHeight:50
- outerHeight(true):50
- width:50
- outerWidth:50
- outerWidth(true):50
- */
-
- alert('height:' + test.height() + '\n' +
- 'outerHeight:' + test.outerHeight() + '\n' +
- 'outerHeight(true):' + test.outerHeight(true) + '\n' +
- 'width:' + test.width() + '\n' +
- 'outerWidth:' + test.outerWidth() + '\n' +
- 'outerWidth(true):' + test.outerWidth(true));
- });
- </script>