[Proto-Scripty] Re: How to get size of div before showing?

2009-07-02 Thread bazikch
In CSS any element styled with display:none; has no sizes because he's no more in the document flow. What you can do is positionning the element ouside the viewport, ie. top: 0; left: -1000px, update it throught AJAX, get the right sizes and then position it where you want. HTH On Jul 1, 3:16 

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread serenobs
Even it has contents but in hidden, still don't know the size? I mean 1. div doesn't have any contents, so size is not determined yet. 2. after 1, div fulfilled remotely by Ajax.updater. so it has contents now. 3. But it is not rendered yet(because this element is hidden field now) At this

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread Vladimir Tkach
Fast solution - $(div.my).hide(); - update div's content by ajax / js - get $(div.my).height() / width() - $(div.my).show() 2009/6/30 serenobs seren...@gmail.com Hi. I'd like to know the size of div before showing. For example, .my { position: absolute; } with this css, size is not

[Proto-Scripty] Re: How to get size of div before showing?

2009-07-01 Thread serenobs
it didn't work properly. my code was something like that, but after update div's content by ajax.updater element.getWidth/Height doesn't return right size. that method returned previous size(=size before call ajax.updater). On 7월1일, 오후6시37분, Vladimir Tkach tea...@gmail.com wrote: Fast solution