
June 8th, 2005
11:50 PM
Neverside Newbie
Status: Offline!
onClick Image Swapping...
it seems like a simple concept...this is an animation of what I am trying to do:
http://www.darkagesextreme.com/terry/onc.gif
so you click on a thumbnail, the image expands to a bigger one, and if you click on that image again it changes to the thumbnail again.
The only problem is I can't seem to get this to work on a mac. I have tried everything and nothing seems to work...the images will just disappear with everything that I try.
any help?

June 9th, 2005
02:03 AM
Neversidian
Status: Offline!
here's a way, its nothing fancy but it gets the job done
function swap_img(thumb)
{
the_img = document.getElementById("the_pic");
the_img.innerHTML = (thumb == TRUE)
? "<a href='#' onclick='return swap_img(FALSE)'><img src='the_big_image.jpg'></a>"
: "<a href='#' onclick='return swap_img(TRUE)'><img src='the_thumb.jpg'></a>";
return false;
}
<span id="the_pic">
<a href='#' onclick='return swap_img(TRUE)'><img src='the_thumb.jpg'></a>
</span>
note: untested
___________________
-Developer
-Forum Leader
-NeverNET
Last edited by aonic, June 9th, 2005 02:17 AM (Edited 1 times)

June 9th, 2005
06:11 AM
Neversidian
Status: Offline!
just edit the script and change onmouseover to onclick ?
___________________

Getox - Web Services | Exero Music Forums!
Go Fuck Your Self
Last edited by Getox, June 9th, 2005 06:14 AM (Edited 1 times)