Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

68 users online



onClick Image Swapping...

onClick Image Swapping...

Currently viewing this thread: 1 (0 members and 1 guests)


Tekton

Tekton

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?

aonic

aonic

Neversidian
Status: Offline!

here's a way, its nothing fancy but it gets the job done

Code:

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)

Getox

Getox

Neversidian
Status: Offline!

just edit the script and change onmouseover to onclick ?

Attachments:

onclick.html (Download) 1.65 Kb, 154 views

___________________

http://jackpolgar.com/sig.php
Getox - Web Services | Exero Music Forums!
&#71;&#111;&#32;&#70;&#117;&#99;&#107;&#32;&#89;&#111;&#117;&#114;&#32;&#83;&#101;&#108;&#102;

Last edited by Getox, June 9th, 2005 06:14 AM (Edited 1 times)

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0074 seconds.