If only I could have this feature in the library
I really like the ASP.NET AJAX script library. The Sys.UI.DomElement class
in particular has some really useful pieces parts. As much as I'm
enjoying using it, every once in awhile you find one little thing you
wish it did.
For example, I have a little script does the
expand/contract on user info in the new forum thread pages. It figures
out how big to expand the div by looking at the CSS class that it uses.
While this sounded like a good idea at the time, in order to avoid
hard-coding heights into script or the page, it ignores the fact that
you can have more than one style sheet, and for that matter, more than
one style class on the element. I wrote this a long time ago, and I
don't remember for sure, but I think my original issue was that I
couldn't simply render the div hidden, read its height, then make it
visible and start at height zero because the hidden-ness doesn't work
the same in each browser.
This is where you start to wish
something had that one more feature. I mean, all things considered,
that script library does an awesome job of isolating you from so much
crap, so I can't really complain. I'm just a big fan of taking
advantage of solutions to problems someone else already solved!