jQuery & IE crashing on $('#someDiv').hide();

Posted by Jimmy on Stack Overflow See other posts from Stack Overflow or by Jimmy
Published on 2010-04-02T15:13:57Z Indexed on 2010/04/02 16:23 UTC
Read the original article Hit count: 165

Filed under:

Well after a while of scratching my head and going "huh?" trying to figure out why IE would straight up crash when loading one of my pages loaded with jQuery goodness, I narrowed down the culprit to this line

$('div#questions').hide();

And when I say IE crashes, I mean it fully crashes, attempting to do its webpage recovery nonsense that fails.

I am running jQuery 1.4.2 and using IE 8 (haven't tested with any other versions)

my current workaround is this:

if ($.browser.msie) { 
    window.location = "http://www.mozilla.com/en-US/products/download.html"; 
}

For some reason I feel my IE users won't be very pleased with this solution though.

The div in question has a lot of content in it and other divs that get hidden and displayed again, and all of that works just fine and dandy, it is only when the giant parent div is hidden that IE flips out and stabs itself.

Has anyone encountered this or have any possible ideas of what is going wrong?

EDIT:

Everything is wrapped up in the $(document).ready(function() { }); And my code is all internal so I can't link it unfortunately.

© Stack Overflow or respective owner

Related posts about jQuery