Why would jquery return 0 for an offsetHeight when firebug says it's 34?

后端 未结 5 1192
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-19 04:43

So I have a div whose content is generated at runtime it initially has no height associated with it. When it\'s generated according to firebug and from what I can alert wit

5条回答
  •  时光说笑
    2020-12-19 05:18

    Are you sure it's not a Heisenbug? If you are setting the height somewhere programmatically and then trying to read it soon later, there is a chance DOM would not have updated.

提交回复
热议问题