0

I have a scroll function on my page that loads when the url is .../originalmusic.html#prices, when '#prices' is added it flicks down to the Prices section with id="prices". So it works quite alright, but I want it to animate scrolling down and I don't know why it doesn't do that. I have tried changing the delay time but that doesn't work either.

Here is the code:

$(document).ready(function(){

    $('#prices').click(function(){

      $("html, body").delay(1000).animate({ scrollTop: $(document).height()-$(window).height() });

   }); 

});

Can anyone help me out? Thanks in advance!

Owen Parsons
  • 71
  • 1
  • 2
  • 9

0 Answers0