View Full Version : Cmotion help stop scrolling on click
electrocit
03-18-2007, 04:49 AM
1) Script Title: Cmotion Image gallery
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm
3) Describe problem: I would like the Cmotion gallery to stop scrolling when an image is clicked. I would love some help on this issue. below is the page that wont stop scrolling if an image is clicked while scrolling.
http://kgimaging.com/tnp/photography.html
Thanks for any help.
jscheuer1
03-18-2007, 06:10 AM
Stops when clicked here in IE 7, FF 1.5.0.10 and Opera 9.01.
electrocit
03-18-2007, 04:55 PM
Just tested it. You are right; works great in mozilla too. My problem seems to be a Safari issue. Unfortunately most of the people who will be viewing my website are Mac users and will be using Safari. I'm not sure if anybody knows a fix for the scroll not stopping in Safari, but if some one does I'd love you to here it.
jscheuer1
03-18-2007, 05:30 PM
I don't have Safari to test on so, this may or may not work and this may or may not cause problems in other browsers but, I'd try (from motiongallery.js - addition red):
function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}
crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
crossmain.onclick=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
}
electrocit
03-18-2007, 08:22 PM
Thank you so much it works perfectly! on safari, mozzilla, and explorer, again I say thanks.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.