1

Possible Duplicate:
jquery smooth scroll to an anchor?

I am creating a blog template (here) and would love to allow for smooth scrolling. Links to the various entries are in the sidebar and are simply <a href="#lorem"><li>Lorem</li></a> and so on. Various other questions have been posted here which are similar, but I have tried to incorporate the JavaScript into my website and each time it hasn't worked Common problems are absolutely nothing happening when I click the link, a pause followed by a normal jump to the correct section (with the pause the length that the animation is meant to be) and a completely ordinary jump.

I am new to JS and jQuery, so I would appreciate very literal advice - I am worried that my attempts have so far failed because of one line of code which is taken as given but which I do not know about.

Thanks in advance.

Community
  • 1
  • 1
GabrielG
  • 189
  • 1
  • 9
  • If nothing is happening, it might mean that you are getting JavaScript errors in which case you would need to get a good JS debugging tool to help troubleshoot the problem. Firebug for Firefox works great. Chrome and IE8+ contain a built in JavaScript console. You should familiarize yourself with one of these. These tools will tell you what the JavaScript error was. – Jeff Feb 16 '12 at 15:36

1 Answers1

1

Maybe this website will help you a bit:

or this tutorial:

mas-designs
  • 7,498
  • 1
  • 31
  • 56
  • I have previously tried the first link with no success, and I just tried the second (again, no luck). Please could you look at the new source code (at the same address as above) and find what is wrong. – GabrielG Feb 16 '12 at 17:39
  • After several tweaks, it's finally working! I had to change html, body to #content and download another js script which defines jquery stuff, but it's working now. – GabrielG Feb 16 '12 at 18:06