show/hide events?
show/hide events?
Hi,
I'm creating some absolute positioned, free floating divs, potentially
with lots of text inside which makes them span the entire width of a
page. I want to avoid that so I need to force a width, but only if
they are rendered wider than said width by default.
Now, I started by using max-width which works great, except I also
make them resizable which will not work without removing the max-width
style. I can remove it at every resize drag event, but that's an extra
effort on the client that could easily be avoided by setting the
initial div width on page load, except they start hidden and size will
only be calculated by the browser on render.
What I ended up doing was add a 'onShow' event to the jQuery.fn.show()
call (I thought about doing that on hide to just to be consistent, but
I have no use case for the hide event).
Is this something desirable? Is there another way around this, like
sniffing on style property changes?
I'm using jQuery 1.2.1, now slightly patched, by the way.
Thanks,
Henrique Ser