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,334
  • 1
  • 17
  • 34

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
  • 120,458
  • 37
  • 198
  • 307
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,334
  • 1
  • 17
  • 34