Thanks Brandon,

Using a timer works perfectly for this. Thanks for the code and for link to Snook's site, which was also helpful.

-Marshall

Brandon Aaron wrote:
This blog post from Jonathan Snook might help you out some. http://snook.ca/archives/_javascript_/ie6_fires_onresize/

Also, you could set a flag using setTimeout ... if the resize function gets called before the setTimeout runs ... reset it. Something along the lines of this:

function doSomething() {
    alert("I'm done resizing for the moment");
};

var resizeTimer = null;
$(window).bind('resize', function() {
    if (resizeTimer) clearTimeout(resizeTimer);
    resizeTimer = setTimeout(doSomething, 100);
});

--
Brandon Aaron

On 7/2/07, Marshall Salinger < [EMAIL PROTECTED]> wrote:

Is there a way to simulate the behavior of FireFox with an
window.onresize event in IE? Where the event only fires at the end of
the onresize method? It appears that doing too many calculations on a
layout while resizing the window in IE makes it slow down considerably
until it finally makes all the calculations and renders the changes.
FireFox works great because it waits until the resizing is done.

Thanks,
Marshall


Reply via email to