Script: CMotion Image Gallery
http://www.dynamicdrive.com/dynamici...iongallery.htm
Hi there,
I'm trying to making a gallery out of this CMotion. My progress so far is this:
http://beard.dialnsa.edu/~lain/motio...ongallery.html
and I cannot move on. I am wishing to pop up a caption besides each product, when corresponding thumbnail is clicked, is there anyway that can be done?
A guy in another forum tried to help me out with this script:
It put captions beside the enlarged view, but it also stopped the CMotion script.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <script language="JavaScript" type="text/javascript"> <!-- function PopUp(mid,msrc,mesid,txt,xos,yos){ var mainobj=document.getElementById(mid); var messobj=document.getElementById(mesid); mainobj.src=msrc; messobj.innerHTML=txt; zxcStyle(messobj,{visibility:'visible',left:(zxcPos(mainobj)[0]+xos)+'px',top:(zxcPos(mainobj)[1]+yos)+'px'}); } function PopDown(id){ zxcStyle(document.getElementById(id),{visibility:'hidden'}); } function zxcStyle(zxcele,zxcstyle,zxctxt){ if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); } for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; } if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); } return zxcele; } function zxcPos(zxcobj){ zxclft=zxcobj.offsetLeft; zxctop=zxcobj.offsetTop; while(zxcobj.offsetParent!=null){ zxcpar=zxcobj.offsetParent; zxclft+=zxcpar.offsetLeft; zxctop+=zxcpar.offsetTop; zxcobj=zxcpar; } return [zxclft,zxctop]; } //--> </script> </head> <body onload="LoadPopUps();" > <a href="#" onmouseover="PopUp('Main','newimg.jpg','M1','some text',100,20);" onmouseout="PopDown('M1');" >LINK</a> <div id="M1"style="position:absolute;visibility:hidden;width:200px;height:150px;background-color:#FFFFCC;border:solid black 1px;" > </div> <br> <br> <img id="Main" src="main.jpg" > </div> </body> </html>
Any correct solution to this?
Thank you for your time.



Reply With Quote

Bookmarks