title: a href class to scroll to div
body: <p>I have 5-10 links all with the same class/</p>
  
  <pre><code>&lt;a class="content-link" href="/profile/about-me/&lt;? echo $row['username'];?&gt;/"&gt;
  </code></pre>
  
  <p>What I'm trying to achieve is when the user clicks on this link that then the user is then navigated to the <code>#profile-body</code> div using javascript.</p>
  
  <p>Very similar to this <a href="https://stackoverflow.com/questions/20630076/scroll-down-from-a-href-to-div">post</a> however the only difference is that instead of having the div which i want the user to be navigated to in the a href like so <code>&lt;a href="#profile-body"&gt;</code> I need it to be done via javascript so that the link I have in the href actually loads.</p>
  
  <p>Thankyou in advance for any help you can provide.</p>