/    Sign up×
Community /Pin to ProfileBookmark

Help with scrolling script

[SIZE=”4″]Hi!
When users click on the right arrow on this page: [URL=”http://www.toula.com/current_collection.html”]http://www.toula.com/current_collection.html [/URL] nothing happens because the page is already as far right as it can be.
Is there a way to modify this so that it works like a loop and we can see the last image come around?
Thanks![/SIZE]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@savvykmsNov 11.2008 — I don't have time to deal with it atm, but try an if statement...

if (document.getElementById('PANORAMA').scrollLeft >= endpoint+1) { }

if (document.getElementById('PANORAMA').scrollLeft <= startpoint-1) { }

or something similar
Copy linkTweet thisAlerts:
@dmotelauthorNov 12.2008 — Oh I forgot to mention that I am a serious newb.

This is the script:

<script type="text/javascript">

var Timer;

function ScrollRight()

{

Timer = setInterval("document.getElementById('PANORAMA').scrollLeft += 2", 15);

}


function ScrollLeft()

{

Timer = setInterval("document.getElementById('PANORAMA').scrollLeft -= 2", 15);

}



</script>


Where would that addition go exactly?
Copy linkTweet thisAlerts:
@dmotelauthorNov 14.2008 — [SIZE="4"]Anyone else able to make a suggestion? I really need to get this working and I don't know how to do it. [/SIZE]
Copy linkTweet thisAlerts:
@dmotelauthorNov 20.2008 — I wound up using Panoramic Image Viewer (PIV) from Martin Krolik (krolik.net) and it seems to work good.
×

Success!

Help @dmotel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...