Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 948375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:14:08+00:00 2026-05-15T23:14:08+00:00

I have a page of thumbnails which change their opacity with a hover with

  • 0

I have a page of thumbnails which change their opacity with a hover with a image swap script built in jquery. However When I run it on a live website it is slow and you have to wait for the second image to load so the hover swap doesn’t happen right away. How would I preload all of the thumb images while the page loads? the site is live here

Here is the html

<div class="span-16 last" id="thumbs">
        <div class="span-4">
            <a href="waterfront.php"><img src="images/thumbs/thumb1.gif" id="thumb1"></a>
        </div>

    </div><!--THUMBS ENDS-->

Here is the jquery

$("#thumb1").hover(
        function(){
            $("#thumb1").attr("src","images/thumbs/thumb1A.gif");
            },

        function(){
            $("#thumb1").attr("src","images/thumbs/thumb1.gif");

        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:14:09+00:00Added an answer on May 15, 2026 at 11:14 pm

    Here is an article to help you.

    It is creating img elements in the DOM.

    I have often done it by making a new Image() and then setting its src property to the image location. You get an event triggered when it loads, which is onload.

    So a brief example would be

    var preload = new Image();
    
    preload.onload = function() { // I believe you need to define this before you set the src for IE
        alert('loaded');
    }
    
    preload.src = 'path/to/image.png';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page with 8 thumbnails, which when clicked pop up a jquery
I have a bunch of image thumbnails I'm displaying in a web page. All
I have a custom image gallery which populates a div with thumbnails, each contained
So I have my own webpage here , which is a sortable thumbnails page.
I have thumbnails on a page, as such: <div id=credits> <a href=largeimage1.jpg alt=credits1.php><img src=thumb1></a>
I have page which is redirected from htaccess. now I can pass the German
I have Page Tab App, which has a landing page with a Log In
I have a page with some controls, usercontrols etc. when I change a div
I have a page which should show a form with checkboxes, post back if
I would like to have a div which changes its content on the page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.