I'm currently working on creating a website for my friend who is a massage therapist.
Utilizing a bootstrap dropdown menu, I have added links to different treatments that direct to the treatment.html from the index.html page.
Is there a way to create multiple links using jQuery that will automatically scroll down to the specific treatment section on the new treatment.html page when there are multiple treatments available?
Apologies for any language errors. I am doing my best as English is not my first language.
I am quite inexperienced with JavaScript and jQuery, this being my first attempt at using them.
I came across this code snippet, but it doesn't seem to be working correctly:
<!-- Treatment scrolldown -->
$("html, body").animate({ scrollTop: $('#treatment1').offset().top }, 1000);
$("html, body").delay(2000).animate({scrollTop: $('#treatment1').offset().top }, 2000);
<!-- End Treatment scrolldown -->