title: Clicking A Link And Auto Scrolling
body: <p>I have a website with a navigation bar on the left of screen, completely filled with 'a' tags that are linked to anchor tags.<br>
  <br>
  While using my website, you will be going to different pages that don't have the grand list of songs you need on them like the home page does.<br>
  <br>
  What I want to happen is on these sub-pages, clicking the 'a' tag takes you to the homepage, then, without you having to press anything again, automatically scrolls to its corresponding anchor tag.<br>
  <br>
  For example, you would click on "All Of Me - John Legend" and it would take you to that page with the info.<br>
  Then (while STILL on the "All of Me" page) you would click on "G" in the navigation bar and it would take you to the home page AND scroll down to the "G Songs" section.<br>
  <br>
  Here is my code, and thanks for the help!</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
   &lt;head&gt;
       &lt;link href="E:/Website/namethatartist/styles/Index_Styling.css" type="text/css" rel="stylesheet" /&gt;
       &lt;link href="E:/Website/namethatartist/styles/Hover-master/css/hover.css" rel="stylesheet" media="all"&gt;
       &lt;link href="E:/Website/namethatartist/styles/animate.css-master/animate.min.css" rel="stylesheet"&gt;
       &lt;title&gt;Name That Artist&lt;/title&gt;
       &lt;meta name="author" content="Hunter Casteel" /&gt;
   &lt;/head&gt;
  
  &lt;style&gt;
      html, body {
       margin: 0;
   }
  
   /* Navigation Menu Styling */
   ul.main-menu {
       list-style-type: none;
       margin: 0;
       padding: 0;
       width: 25%;
       background-color: #f1f1f1;
       position: fixed;
       height: 100%;
       overflow: auto;
   }
  
   ul.main-menu li a {
       display: block;
       color: #000;
       text-decoration: none;
       height:3.29999vh;
       font-size:2.2vh;
       padding:0.15vh 10%;
       font-family: Times New Roman;
   }
  
   ul.main-menu li a.active {
       background-color: #ef402c;
       color: white;
   }
  
   li a:hover:not(.active) {
       background-color: #555;
       color: white;
   }
  
   /* Text Styling */
   h1, h2, p {
      font-family: Calibri
   }
  
   p a:link, p a:visited{
       font-family: Times New Roman;
       color: black;
       text-decoration: none;
   }
  
   p a:hover {
      color: red;
   }
  
   a {
       padding: 2vh 2vh 1px 1px;
   }
   &lt;/style&gt;
  
   &lt;body background="E:/Website/namethatartist/media/images/paper.jpg"&gt;
       &lt;ul class="main-menu"&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal active" href="#home"&gt;Home&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#a_songs"&gt;A&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#b_songs"&gt;B&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#c_songs"&gt;C&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#d_songs"&gt;D&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#e_songs"&gt;E&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#f_songs"&gt;F&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#g_songs"&gt;G&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#h_songs"&gt;H&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#i_songs"&gt;I&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#j_songs"&gt;J&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#k_songs"&gt;K&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#l_songs"&gt;L&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#m_songs"&gt;M&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#n_songs"&gt;N&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#o_songs"&gt;O&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#p_songs"&gt;P&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#q_songs"&gt;Q&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#r_songs"&gt;R&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#s_songs"&gt;S&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#t_songs"&gt;T&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#u_songs"&gt;U&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#v_songs"&gt;V&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#w_songs"&gt;W&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#x_songs"&gt;X&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#y_songs"&gt;Y&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a class="hvr-wobble-horizontal" href="#z_songs"&gt;Z&lt;/a&gt;&lt;/li&gt;
       &lt;/ul&gt;
  
       &lt;div style="margin-left:25%;padding:1px 16px;height:1000px;"&gt;
           &lt;hr id="home"/&gt;&lt;hr/&gt;
           &lt;h1 class="hvr-underline-from-center animated tada"&gt;Welcome To Name That Artist&lt;/h2&gt;
           &lt;button style="float:right;" class="animated hvr-pop" action="logInPage.php"&gt;Log In&lt;/button&gt;
           &lt;p&gt; You can find information about a song from the wide selection we offer.&lt;/p&gt;
           &lt;h3&gt;Use the navigation bar on the left to jump to songs with that first letter.&lt;/h3&gt;
           &lt;hr id="a_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;A&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="all_of_me_john_legend" class="hvr-float-shadow" href="songs/a/All_Of_Me_John_Legend.html"&gt;All Of Me - John Legend&lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="b_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;B&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="bad_blood_bastille" class="hvr-float-shadow" href="songs/b/Bad_Blood_Bastille.html"&gt;Bad Blood - Bastille&lt;/a&gt;
                       &lt;a href="songs/b/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/b/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="c_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;C&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="cake_by_the_ocean_dnce" class="hvr-float-shadow" href="songs/c/Cake_By_The_Ocean_DNCE.html"&gt;Cake By The Ocean - DNCE&lt;/a&gt;
                       &lt;a href="songs/c/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/c/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="d_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;D&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="dont_stop_believin_journey" class="hvr-float-shadow" href="songs/d/Dont_Stop_Believin_Journey.html"&gt;Don't Stop Believin' - Journey&lt;/a&gt;
                       &lt;a href="songs/d/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/d/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="e_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;E&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="eye_of_the_tiger_survivor" class="hvr-float-shadow" href="songs/e/Eye_Of_The_Tiger_Survivor.html"&gt;Eye Of The Tiger - Survivor&lt;/a&gt;
                       &lt;a href="songs/e/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/e/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt; 
           &lt;hr id="f_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;F&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="feel_good_robin_thicke" class="hvr-float-shadow" href="songs/f/Feel_Good_Robin_Thicke.html"&gt;Feel Good - Robin Thicke&lt;/a&gt;
                       &lt;a href="songs/f/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/f/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="g_songs" class="revealOnScroll animated bounce"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;G&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="geronimo_sheppard" class="hvr-float-shadow" href="songs/g/Geronimo_Sheppard.html"&gt;Geronimo - Sheppard&lt;/a&gt;
                       &lt;a href="songs/g/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/g/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="h_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;H&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="here_alessia_cara" class="hvr-float-shadow" href="songs/h/Here_Alessia_Cara.html"&gt;Here - Alessia Cara&lt;/a&gt;
                       &lt;a href="songs/h/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/h/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="i_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;I&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="i_write_sins_not_tragedies_panic_at_the_disco" class="hvr-float-shadow" href="songs/i/I_Write_Sins_Not_Tragedies_Panic_At_The_Disco.html"&gt;I Write Sins Not Tragedies - Panic! At The Disco&lt;/a&gt;
                       &lt;a href="songs/i/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/i/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="j_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;J&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="just_give_me_a_reason_pink" class="hvr-float-shadow" href="songs/j/Just_Give_Me_A_Reason_Pink.html"&gt;Just Give Me A Reason - P!nk&lt;/a&gt;
                       &lt;a href="songs/j/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/j/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="k_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;K&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="kill_of_the_night_gin_wigmore" class="hvr-float-shadow" href="songs/k/Kill_Of_The_Night_Gin_Wigmore.html"&gt;Kill Of The Night - Gin Wigmore&lt;/a&gt;
                       &lt;a href="songs/k/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/k/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="l_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;L&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="latch_disclosure" class="hvr-float-shadow" href="songs/l/Latch_Disclosure.html"&gt;Latch - Disclosure&lt;/a&gt;
                       &lt;a href="songs/l/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/l/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="m_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;M&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="me_and_my_broken_heart_rixton" class="hvr-float-shadow" href="songs/m/Me_And_My_Broken_Heart_Rixton.html"&gt;Me And My Broken Heart - Rixton&lt;/a&gt;
                       &lt;a href="songs/m/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/m/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="n_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;N&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="the_nights_avicci" class="hvr-float-shadow" href="songs/n/The_Nights_Avicci.html"&gt;The Nights - Avicci&lt;/a&gt;
                       &lt;a href="songs/n/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/n/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="o_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;O&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="on_my_mind_ellie_goulding" class="hvr-float-shadow" href="songs/o/On_My_Mind_Ellie_Goulding.html"&gt;On My Mind - Ellie Goulding&lt;/a&gt;
                       &lt;a href="songs/o/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/o/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="p_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;P&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="paradise_coldplay" class="hvr-float-shadow" href="songs/p/Paradise_Coldplay.html"&gt;Paradise - Coldplay&lt;/a&gt;
                       &lt;a href="songs/p/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/p/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="q_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;Q&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a href="songs/q/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/q/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/q/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="r_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;R&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="rather_be_clean_bandit" class="hvr-float-shadow" href="songs/r/Rather_Be_Clean_Bandit.html"&gt;Rather Be - Clean Bandit&lt;/a&gt;
                       &lt;a href="songs/r/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/r/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="s_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;S&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="secrets_coldplay" class="hvr-float-shadow" href="songs/s/Secrets_Coldplay.html"&gt;Secrets - Coldplay&lt;/a&gt;
                       &lt;a href="songs/s/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/s/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="t_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;T&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="this_is_how_we_do_katy_perry" class="hvr-float-shadow" href="songs/t/This_Is_How_We_Do_Katy_Perry.html"&gt;This Is How We Do - Katy Perry&lt;/a&gt;
                       &lt;a href="songs/t/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/t/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="u_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;U&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="uma_thurman_fall_out_boy" class="hvr-float-shadow" href="songs/u/Uma_Thurman_Fall_Out_Boy.html"&gt;Uma Thurman - Fall Out Boy&lt;/a&gt;
                       &lt;a href="songs/u/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/u/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="v_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;V&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="victorious_panic_at_the_disco" class="hvr-float-shadow" href="songs/v/Victorious_Panic_At_The_Disco.html"&gt;Victorious - Panic! At The Disco&lt;/a&gt;
                       &lt;a href="songs/v/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/v/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="w_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;W&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="want_to_want_me_jason_derulo" class="hvr-float-shadow" href="songs/w/Want_To_Want_Me_Jason_Derulo.html"&gt;Want To Want Me - Jason Derulo&lt;/a&gt;
                       &lt;a href="songs/w/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/w/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="x_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;X&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="xo_the_eden_project" class="hvr-float-shadow" href="songs/x/XO_The_Eden_Project.html"&gt;XO - The Eden Project&lt;/a&gt;
                       &lt;a href="songs/x/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/x/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="y_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;Y&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a id="you_know_you_like_it_dj_snake" class="hvr-float-shadow" href="songs/y/You_Know_You_Like_It_DJ_Snake.html"&gt;You Know You Like It - DJ Snake&lt;/a&gt;
                       &lt;a href="songs/y/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/y/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
           &lt;hr id="z_songs"/&gt;&lt;hr/&gt;&lt;p align="center"&gt;Z&lt;/p&gt;&lt;hr/&gt;
               &lt;div&gt;
                   &lt;p&gt;
                       &lt;a href="songs/z/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/z/.html"&gt; &lt;/a&gt;
                       &lt;a href="songs/z/.html"&gt; &lt;/a&gt;
                   &lt;/p&gt;
               &lt;/div&gt;
       &lt;/div&gt;
   &lt;/body&gt;
  </code></pre>
  
  <p></p>