Side navigation
#12845 closed bug (duplicate)
Opened November 04, 2012 04:13PM UTC
Closed November 04, 2012 05:46PM UTC
$(window).height() do not return the right window size
| Reported by: | Madef | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Hi,
jQuery 1.8.2 have a small bug with viewport size ($(window).height()). The height returned is the one of the document. I do not reproduced the problem with 1.4.2, I did not try with other version. I reproduce the problem on chrome and firefox.
Please to reproduce the problem try this code and on the browser console try :$(window).height().
<html>
<body>
<style>
.floating {
margin: 5px;
float: left;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<a href="#" class="floating">
<img src="http://jquery.org/wp-content/uploads/2010/01/JQuery_logo_color_onwhite-300x74.png" />
</a>
<a href="#" class="floating">
<img src="http://jquery.org/wp-content/uploads/2010/01/JQuery_logo_color_onwhite-300x74.png" />
</a>
<!-- copy the link many times -->
</body>
</html>
To fix my problem I used "document.body.clientHeight" which give the correct size of the viewport.
Best regards,
Attachments (0)
Change History (1)
Changed November 04, 2012 05:46PM UTC by comment:1
| resolution: | → duplicate |
|---|---|
| status: | new → closed |
Duplicate of #12284.