PDA

View Full Version : CMotion Image Gallery - Back to start?



jlizarraga
07-16-2008, 10:01 PM
1) Script Title:

CMotion Image Gallery

2) Script URL (on DD):

http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm

3) Describe problem:

No problem really. Was just wondering if anyone knows the JS I'll need to tell the gallery to go back to its starting position.

Thanks!

jscheuer1
07-17-2008, 12:12 AM
Since this gallery already resets onresize, you can just use that, ex:


<a href="#" onclick="onresize();return false;">Reset Gallery</a>

jlizarraga
07-17-2008, 05:07 PM
Big thanks Scheudog. Exactly what I needed.

jlizarraga
07-17-2008, 05:09 PM
Uh oh. Actually this doesn't work in IE6.

This error spits out:

"Object doesn't support this property or method"

;-;

jlizarraga
07-17-2008, 05:22 PM
Okay now I'm using this and it works in both browsers:

function backToStart(){
cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
}