Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

small error, i need help

Status
Not open for further replies.

alpkan

Technical User
Feb 11, 2009
2
US
Hi,
On my web page, I am using a smooth scroll script.
Script does not work when I hit a button for the first time, but after,
when I click on another button, it starts working perfectly.
I was wondering if someone can advise me on what the problem is.

alpkanswork.com

Thank you.
Alp
 
some sample code might help me (or someone else) help you.

 
And how about your code for the buttons?

I'm new here, so I won't speak for everyone else, but as someone menioned in another thread in this forum, this isn't a place to get people to write your code for you.

If you don't know what you are doing or need someone to implement your script for you try hiring someone and paying them to do it, instead of coming to a message board and trying to get something for free.

 
Dan,

For your button links remove the "index.html" and just use the anchor...

When you are on and click on the link with the page name the first thing the browser is doing is refreshing itself so you go from


to


The reason it works the second time is because you are already on the page (I know your technically on the page, but as far as the browser is concerned you are not because of the url)....

If you remove the page name (i.e. index.html) the links will just anchor to the appropriate section on that page.

Code:
<a href="[s]index.html[/s]#top" class= "two">Introduction</a>

Try that and let me know how you fair - if it doesn't work I'll look into it some more...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top