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 6215839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:07:43+00:00 2026-05-24T07:07:43+00:00

When using the jQuery .hover() function to switch out two images, I often find

  • 0

When using the jQuery .hover() function to switch out two images, I often find a flicker when they are being switched on the first load. I assume this is because the second of the two isn’t loaded along with the main page, and so the transition isn’t completely smooth and there’s a slight flicker.

In theory, this should be then rectifiable by placing a 1px by 1px image with display: none; set as styling, which will load the image when the main page loads, thus cacheing it at the same time and removing the flicker.

However, I’m wondering if there’s any other/better solutions that are commonly used to force an image to load, as surely I’m not the only one who has this issue.

Any comments or advice would be greatly appreciated :).

  • 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-24T07:07:44+00:00Added an answer on May 24, 2026 at 7:07 am

    A far better way to prevent hover image flickering is to use CSS sprites.

    Even if you decide to use JavaScript to achieve the hovering effect (although hover effect is perfectly achievable with plain CSS ) you will still have your “second” (hovered) image loaded by the time it needs to be displayed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just using the jquery hover : $.each(navItems, function(i){ $(navItems[i]).hover(function(){ $(this).find('ul:first').css({visibility: visible,display: none}).show();
I am using the following jquery code: $(#top ul li.corner).mouseover(function(){ $(span.left-corner).addClass(left-corner-hover); $(span.right-corner).addClass(right-corner-hover); $(span.content).addClass(content-hover); }).mouseout(function(){
I am trying to add some slide in/out descriptions to images using jQuery as
I am using jQuery idTabs pluging. I want to give hover feature and use
Using jquery how do I focus the first element (edit field, text area, dropdown
Using jQuery, what's the best way to find the next form element on the
Using jQuery, how do I delete all rows in a table except the first?
Using jQuery, how would you find elements which have a particular style (eg: float:
I'm having problems using jQuery's hover feature with the Wordpress loop. Everytime I hover
I am trying to change the color on text on hover using Jquery. I

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.