Free AdviceGet Free Advice
Home | Get advice | Give advice | Topics | Columnists | - !START HERE! -
Make Suggestions | Sitemap

Get Advice


Search Questions

Ask A Question

Browse Advice Columnists

Search Advice Columnists

Chat Room

Give Advice

View Questions
Search Questions
Advice Topics

Login

Username:
Password:
Remember me
Register for free!
Lost Password?

Want to give Advice?

Sign Up Now
(It's FREE!)

Miscellaneous

Shirts and Stuff
Page Backgrounds
Make Suggestions
Site News
Link To Us
About Us
Terms of Service
Help/FAQ
Sitemap
Contact Us


image links


Question Posted Sunday June 10 2007, 10:17 am

ok so im making a graphics site and i have images as links and i want to make the image have a cute design when you scroll over it so whats the code to make the image change when you scroll over it?

[ Answer this question ]
Want to answer more questions in the Technology category?
Maybe give some free advice about: Internet & Web Design?


theymos answered Sunday June 10 2007, 3:52 pm:
Here's an example of that effect. I've replaced http colon slash slash with hxxp\ so it doesn't change it into a link:

<html>
<head>
<script type="text/javascript">
function animate()
{
document.advicenators.src ="hxxp\www.google.com/intl/en_ALL/images/logo.gif" /*advicenators is the name of the element I want to change*/
}
function unanimate()
{
document.advicenators.src ="hxxp\www.advicenators.com/img/hsingle.gif"
}
</script>
</head>

<body>

<img src="hxxp\www.advicenators.com/img/hsingle.gif" name="advicenators" onmouseover="animate()" onmouseout="unanimate()" />
<!--onmouseover is triggered when a mouse is over it, but it is NOT changed when a mouse leaves it. So you need onmouseout to change it to it's original -->
</body>
</html>

It switches between the advicenators and google logos. This won't work on myspace, only sites that allow javascript. There's no way to do it without javascript. There might be a more elegant solution for what you need(so you don't have to make two new functions for each image), but I don't want to mess with it right now.

[ theymos's advice column | Ask theymos A Question
]


More Questions:

<<< Previous Question: Beach
Next Question >>> best friends boyfriend

Recent popular questions:
Want to give advice?

Click here to start your own advice column!

What happened here with my gamer friends?

All content on this page posted by members of advicenators.com is the responsibility those individual members. Other content © 2003-2014 advicenators.com. We do not promise accuracy, completeness, or usefulness of any advice and are not responsible for content.

Attention: NOTHING on this site may be reproduced in any fashion whatsoever without explicit consent (in writing) of the owner of said material, unless otherwise stated on the page where the content originated. Search engines are free to index and cache our content.
Users who post their account names or personal information in their questions have no expectation of privacy beyond that point for anything they disclose. Questions are otherwise considered anonymous to the general public.

[Valid RSS] eXTReMe Tracker