Opened 14 years ago
Closed 14 years ago
#4396 closed bug (worksforme)
the function css('height') returns "0px" in Opera
Reported by: | carkey712 | Owned by: | brandon |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | dimensions | Version: | 1.3.2 |
Keywords: | css() in Opera | Cc: | |
Blocked by: | Blocking: |
Description
<style> .obj {display:none; width:400px; height:400px;} </style> <script> alert($('.obj').css('height')); </script>
result: height returns "0px" in Opera if the obj is hidden, also happended with width.
Change History (5)
comment:1 Changed 14 years ago by
comment:2 follow-up: 3 Changed 14 years ago by
What does your html look like? A complete test case would help.
comment:3 Changed 14 years ago by
Replying to dmethvin:
What does your html look like? A complete test case would help.
code like this:
<style> div { width:200px; height:200px; display:none} </style>
<script> $(function(){
alert($('#test').css('width')); output: 0 in Opera;
}); </script>
<div id="test"> </div>
note: alert($('#test').width()); output:200, this method is normal in Opera.
comment:4 Changed 14 years ago by
Component: | offset → dimensions |
---|
comment:5 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This works for me, both css("width") and width(), in Opera 9.64.
i wish i could get the fixed release of jquery for me via recieved E-mail