SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Image Preloader

  1. #1
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    At My Desk!!
    Posts
    1,642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image Preloader

    Hey guys heres the situation, I am pulling all my images out of the DB (well the links, and the images are stored in a file) I need to preload the images I am using as I am doing an on hover image swap but im not including my javascript script until half way down the page, any suggestions on what I can do?

    p.s im a javascript noob, in fact that would be a promotion so ill need ot spelling out if thats ok, i.e a tutorial or something
    "Am I the only one doing ASP.NET in Delphi(Pascal)?"

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can do it using CSS.
    Code:
    div#image1 {background:url(image1.gif); display:none;}
    div#image2 {background:url(image2.gif); display:none;}
    div#image3 {background:url(image3.gif); display:none;}
    And so on. The browser will download the images, but the user will not be aware of this.

    There are also millions of scripts on the internet that will do it for you, you should have searched for this first. E.g. http://www.howtocreate.co.uk/jslibs/script-imgpreld

  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •