FancyBox causing hanging in Internet Explorer

I recently received feedback from people saying that some web sites I had worked on were loading slowly and freezing for a second or two in Internet Explorer on each page load.

After checking that images were well optimised I guessed the next thing to check should be any JavaScript the pages were loading.

I removed all JavaScript includes and the pages loaded fine so I added them in again until I was able to re-create the ‘hanging’ issue – FancyBox seemed to be the culprit.

I’ve not yet figured out why, but the hang appears to happen around the same time that the HTML DOM structure finishes loading. During the ‘freeze’ the browser hangs completely and you cannot click any links, scroll, or interact with the page in any way.

The hang even happens when viewing the FancyBox web site in IE although is it for a much shorter period of time – maybe the duration of the hand is influence but the amount of HTML or links on a page?

As I don’t have enough time to investigate further, for the moment I shall continue to use jQuery lightBox or one of the other image popup scripts. Shame, as FancyBox is the nicest and cleanest I have found so far.