/    Sign up×
Community /Pin to ProfileBookmark

smooth scroll question

Hi all.
I am having a problem with smooth scrolling script that I added to my page.
I have three anchors; the top, middle, and bottom of the page, and three buttons to take the viewer to these points.
The script works perfectly after the second click on any of the buttons but it just does not work on the first click.
After the first click, page goes right to the anchor point without scrolling smoothly, it ignores the script.
But after that, when the viewer clicks for a second time on any button, everything works fine.
I was wondering if anyone can guess what the problem might be.
The problem page: [url]www.alpkanswork.com[/url]

Thanks.
Alpkan

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 07.2009 — [I]Error 403 - Forbidden[/I] access to site!
Copy linkTweet thisAlerts:
@alpkanauthorFeb 07.2009 — I had to move the files.

But still without seeing the webpage, can any one suggest something?
Copy linkTweet thisAlerts:
@FangFeb 07.2009 — Incorrect setting of style in an if...else statement. Essentially, the inline style was not initially set.
×

Success!

Help @alpkan 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.18,
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,
)...