Discuss: Text-Resize Detection
by Lawrence Carvalho, Christian Heilmann
- Editorial Comments
2 jQuery Plugin
I created a plugin, jQEm a few weeks back that adds similar functionality to the jQuery library.
I found that with Internet Explorer you can use setExpression to avoid having to inefficiently poll for changes periodically.
posted at 11:31 am on September 12, 2006 by Dave Cardwell
3 Another JavaScript implementation
It shouldn’t be used as an excuse for developers to not design sites properly. Not everyone uses JavaScript.
That said, it’s a good solution to a common problem. Obviously you need a bit of JavaScript knowledge already. Out of interest, why didn’t you move all the JavaScript to external files?
posted at 11:33 am on September 12, 2006 by Adam Craven
5 Worthwhile Javascript
It shouldn’t be used as an excuse for developers to not design sites properly. Not everyone uses JavaScript
I don’t agree that this does equate to “not designing sites properly”. It is perfectly possible, maybe even very easy, to design a site that functions at all text sizes, but may not look all that good at the extremes of the scale.
Using Javascript to improve the performance of the page is perfectly acceptable – as long as the page still functions OK when JS is not enabled.
posted at 11:42 am on September 12, 2006 by Stephen Down
8 Excellent!
Thanks again for another great ALA article.
As ‘designers’ are, to a greater and greater extent, actually designing web sites the need to fix broken layouts due to large font sizes shouldn’t be much of an issue.
Personally, I feel comfortable with designing a layout such that nothing breaks/overlaps for any of IE’s range of font sizes (a range which covers enough but doesn’t generally extend to silly large sizes). If a FireFox user wants to supersize the text then so be it.
However, buttons containing a fair amount of text are often annoying as I’ve never seen a browser that will maintain a fixed button size and wrap the text accordingly. Merely having the option, through text-resize detection and a bit of JS, to get a button to grow only vertically but not horizonally would be quite nice and is something I’ll have to play with some time soon.
posted at 12:44 pm on September 12, 2006 by Jon Cram
9 Almost
It doesn’t work properly in Opera. A pop-up message occurs every time you zoom in an extra 20%! So at 110%, nothing. But press + again to reach 120% zoom and the pop-up tells me the font size has decreased by 1px. This happens every 20%. Therefore, the script cannot be used as it stands – unless you hide it from Opera users.
posted at 03:30 pm on September 12, 2006 by Chris Hester
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.


1 Discuss
Use this space to discuss the different options of this solution or to brag about great implementations. You can also use this spot to ask for solutions and liase with other developers willing to implement them. I will be busy over the next three days training some people in sunny Munich, but Lawrence will keep an eye on what is happening.
posted at 11:22 am on September 12, 2006 by Christian Heilmann