View Full Version : CMotion wont scroll w/ startpos=0 in Firefox

Tyler Jay
02-11-2009, 04:42 AM
1) Script Title: CMotion Image Gallery I

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm

3) Describe problem: CMotion wont scroll with js variable startpos=0 in Firefox 3.
It works fine when set to startpos=1 or 2

See for yourself:
http://tylermadeit.com/test/portfoliotest.html (http://tylermadeit.com/test/portfoliotest.html)

The one with variable set to startpos=1 (http://tylermadeit.com/test/portfoliotest2.html)

Its probably something silly. Thanks in advance.

Surprisingly it works in IE.

02-11-2009, 06:22 AM
Any reason that you got rid of (highlighted):

<div id="motiongallery" style="position:absolute;left:0;top:0;white-space: nowrap;">

from the on page markup? The script needs that. Replace it and it will work. Also (though it appears not to be a factor in this case), the setting of (from the script):

//3) Set to maximum width for gallery - must be less than the actual length of the image train.
var maxwidth=9000;

seems a bit too long. I think this only really matters when the style width is set as a percentage, but 900 would be a more reasonable figure here. Whatever it is, it must be less than the actual length of all of the images placed end to end.

Tyler Jay
02-11-2009, 08:56 AM
Thanks John, I knew it was something silly.
No idea how that got deleted.