The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Javascript site loading page.

  • # June 8, 2009 at 1:43 am

    Hello everyone.

    I’m creating a portfolio site for my self. And the background Image is very large and detailed, so of course it is a very large file size.

    I’m looking for a piece of javascript that will show a loading bar until the image is first loaded, Then take you to the page.

    Thank you.

    # June 8, 2009 at 2:45 am

    I haven’t heard of a javascript loading bar for an image. It sounds like your in need of a Flash Loading bar *toot* … but then it’d have to be flash… If you’re not going flash, I’d recommend decreasing the file quality and having the image load last…

    # June 12, 2009 at 6:32 am

    You can do it in jquery

    Have a javascript lay a div loading over the page and a progressbar slowly increasing and for good measure end at 80% (ish)

    Attach window.load( ….animate to 100% …. then kill loading page)
    note that .load wont fire untill the dom has finished loading all its request

    So roughly the code would look like this


    completely untested just typed in the textarea… but gives you an idea

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed