You can use this preload plugin and run it as soon as possible:

jQuery.preloadImages = function()
{
        for(var i = 0; i<arguments.length; i++)
        {
                jQuery("<img>").attr("src", arguments[i]);
        }
}

$.preloadImages("over.png", "out.gif");
$(
        function()
        {
                // do something when page is ready
        }
)

On Apr 6, 8:14 am, "miCRoSCoPiC^eaRthLinG"
<[EMAIL PROTECTED]> wrote:
> Hi,
>   I am loading this animated .gif loader image into the blockUI
> dialog. When the dialog comes up, there's a lag of 2-3 seconds before
> the image appears.. this looks pretty unprofessional. So is there any
> way to pre-load these images so that they appear along with the
> message the moment the dialog pops-up?
>
> Thanks,
> m^e

Reply via email to