Skip to main content

Bug Tracker

Side navigation

#4396 closed bug (worksforme)

Opened March 21, 2009 05:24PM UTC

Closed May 01, 2009 12:30AM UTC

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.

Attachments (0)
Change History (5)

Changed March 21, 2009 05:29PM UTC by carkey712 comment:1

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

Changed March 21, 2009 09:19PM UTC by dmethvin comment:2

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

Changed April 07, 2009 06:27AM UTC by carkey712 comment:3

Replying to [comment:2 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.

Changed May 01, 2009 12:24AM UTC by brandon comment:4

component: offsetdimensions

Changed May 01, 2009 12:30AM UTC by brandon comment:5

resolution: → worksforme
status: newclosed

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