user2252219
user2252219

Reputation: 865

Scroll to bottom not working in IE or FF, only Chrome

If you press the "Profile" button in the top right, it will scroll to the bottom of the page in Chrome but not in FF or IE. I'm not sure why not. Is it because JS is being blocked?

   $("#profile").click(function() {
       $('body').animate({
           scrollTop: $(".anchor-point").offset().top
       }, 2000);
   });

http://imdarrien.com/

Upvotes: 0

Views: 54

Answers (1)

Undefitied
Undefitied

Reputation: 747

You need to use $('html, body') instead of $('body') :

    $("#profile").click(function() {
       $('html, body').animate({
           scrollTop: $(".anchor-point").offset().top
       }, 2000);
   });

Upvotes: 1

Related Questions