jQuery pre document ready event

Posted by Luke Duddridge on Stack Overflow See other posts from Stack Overflow or by Luke Duddridge
Published on 2010-05-20T09:01:27Z Indexed on 2010/05/20 9:10 UTC
Read the original article Hit count: 406

Filed under:
|
|
|

Hi,

I have a list of 179 thumbnail images that I am trying to apply a jQuery lightbox tool to an unorder list of hyper-links.

The problem I have is, the jQuery isnt firing until the images have finished downloading, each image is around 23K so on their own, not so big, but as a group this equates to around 4MB.

There is a delay on IE (main browser used by clients) of a good 5 seconds before the page has completely downloaded every thumbnail and then allows the jQuery to fire.

I have tried putting the jQuery document ready event in various places with no success, and only been able to put a bandaid on by setting the css on the ul to hide using display:none before applying .show() after the lightbox has applied.

I was hoping there is a way to make the jQuery scripts fire before all the content has downloaded?

Cheers

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about images