[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Image change onmouse over

Posted on 2009-04-05
2
Medium Priority
?
318 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

650 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