HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

swapImage with mojozoom?
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> Javascript
View previous topic :: View next topic  
Author Message
griebs



Joined: 05 Jul 2009
Posts: 3

Posted: Wed Jul 15, 2009 8:44 am     swapImage with mojozoom?  

I'm trying to swap "front.png" with "back.png" onClick and retain my mojozoom functionality as well. What happens is when I implement the swapimage (replace the id "changingImage"), the zoom tool uses "frontbig.png" as it well should, it's just I don't know how to tell it to look elsewhere (for "backbig.png").

Code:
<div style="float:left;">
<img src="media/front.png" name="changingImage" width="254" height="277" hspace="15" vspace="35" id="changingImage" data-zoomsrc="media/frontbig.png" /></div>


As you can see, I've got the MojoZoom identifier ("data-zoomsrc...") in the div tag with the first image.

I tried implementing a javascript "if/else" command but couldn't get it to work... if the image is front.png use frontbig.png/else use backbig.png (paraphrasing of course!). I also tried making separate div entirely, with full mojozoom functionality, only the second image is kicked to the right (won't float over/cover "front.png")

I am using it for a clothing site and those which I have seen use extremely complicated code, five to six separate js files, etc so it's hard to get any "ideas". Thought I'd try here again, since I was so well helped last time. Thanks--

Moved to JavaScript. let Mod know if you do not think it is a JS problem. Mod
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> Javascript
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group