?
Solved

Image change onmouse over

Posted on 2009-04-05
2
Medium Priority
?
317 Views
Last Modified: 2012-05-06
I'm using attached code to change the image when mouse point over the image.

The problem is, when mouse is over the image, it downloads the image from server, and then change. I mean it takes a bit of time to change.

Is it possible both image will load when page the page gets loaded. and it will change image immediately when mouse over the image.
<img src="img-0.GIF" onmouseover="this.src='img-1.GIF';" onmouseout="this.src='img-0.GIF';">

Open in new window

0
Comment
Question by:marchent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 2000 total points
ID: 24072128
Yes, you can preload the image with javascript, for instance:

img = new Image();
img.src = "img-1.GIF";
0
 
LVL 13

Author Closing Comment

by:marchent
ID: 31566791
sounds nice to me.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question