Bug Tracker

Modify

Ticket #4396 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 4 years ago by carkey712

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

comment:2 follow-up: ↓ 3 Changed 4 years ago by dmethvin

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

comment:3 in reply to: ↑ 2 Changed 4 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 4 years ago by brandon

  • Component changed from offset to dimensions

comment:5 Changed 4 years ago by brandon

  • Status changed from new to closed
  • Resolution set to worksforme

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.