Bug Tracker

Opened 10 years ago

Closed 10 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 10 years ago by carkey712

i wish i could get the fixed release of jquery for me via recieved E-mail

comment:2 Changed 10 years ago by dmethvin

What does your html look like? A complete test case would help.

comment:3 in reply to:  2 Changed 10 years ago by carkey712

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 10 years ago by brandon

Component: offsetdimensions

comment:5 Changed 10 years ago by brandon

Resolution: worksforme
Status: newclosed

This works for me, both css("width") and width(), in Opera 9.64.

Note: See TracTickets for help on using tickets.