How to fix the resize event in IE

In IE the window resize event is fired multiple times per actual resize: it is a well known issue for IE6 and IE7, but they misbehave along different patterns. Actually it seems that IE6 is worse than IE7.

After quite a long session of R&D, I’ve got to a pretty good solution, in the form of a jQuery plugin: jquery.wresize.js

{[.script | 1.hilite(=javascript=)]}

If you want to try it, here is a test page, where a div is automatically resized when the window is resized.

{[.testpage | 1.hilite(=html=)]}

References:

http://dev.jquery.com
http://snook.ca
http://ecmascript.stchur.com

Make yourself at home with HotChili

Syntax highlighting makes code structures pop up, puts order into the intricacies of a program, let’s you concentrate on the logical connections.

Chili does a great job. If you are a blog author, you can easily add syntax highlighting to your scripts, even if you have a very limited control on page generation. And Chili does offer you many configuration options, including the possibility to adapt color schemes at your taste. In fact, the CSS for a language is maybe the first thing Chili users change. They want their highlighting to suit their vision, they build a pattern that matches their engine.

HotChili is better. If you are a blog reader, you can easily* add syntax highlighting to scripts that are not yours, even if they are already highlighted. Pretty cool: you can adapt almost any script to your color scheme!!

* (two clicks)