#3037 closed bug (wontfix)
offset returns top/left = 0 for a position: absolute / display: none div element
Reported by: | epsilon68 | Owned by: | brandon |
---|---|---|---|
Priority: | undecided | Milestone: | 1.3 |
Component: | offset | Version: | 1.2.6 |
Keywords: | offset display none | Cc: | |
Blocked by: | Blocking: |
Description
Offset returns a top / left = 0 for my div that is in position absolute and in display none.
this is blocking me to switch completely from Interface to jQuery-UI
I need to have the transfer between a displayed element to another one not yet visible, fade in after the transfer effect.
Many thanks in advance for your help and thanks a million for your work !!!
Cheers, Sylvain Pointeau
Attachments (1)
Change History (6)
Changed 13 years ago by
Attachment: | offset.html added |
---|
comment:2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
http://docs.jquery.com/CSS/offset "The method works only with visible elements."
You could set display:block before calling offset() though.
comment:3 Changed 12 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Actually, I'll reopen this and let brandon or others weigh in on whether removing this limit is practical.
comment:4 follow-up: 5 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Checking to see if the element is hidden is to much overhead for an already costly method. We would just be setting it's display to block (like interface was doing) before calculating offset. Just call .show().offset().
comment:5 Changed 7 years ago by
Replying to brandon:
Checking to see if the element is hidden is to much overhead for an already costly method. We would just be setting it's display to block (like interface was doing) before calculating offset. Just call .show().offset().
Thanks for sharing that workaround. This issue was kicking my behind!
test case