1

I tried to implement the js below from here:

$("a[href='#top']").click(function() {
  $("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});

It just produces an error in the console that I can't seem to remedy.

Community
  • 1
  • 1
m33bo
  • 1,262
  • 1
  • 14
  • 33

2 Answers2

0

Problem lies some where else in the script.Your Code is working fine after adding }).

$("a[href='#top']").click(function() {
  $("html, body").animate({ scrollTop: 1000 }, "slow");
  return false;
});
Suresh Atta
  • 118,038
  • 37
  • 189
  • 297
0

In order to fix I had to clear cache. You can do this in Firefox with the Web Developers Toolbar or in Chrome in Preferences.

m33bo
  • 1,262
  • 1
  • 14
  • 33