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?
<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 ]
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.