title: Having Trouble With a Javascript Scroller without a Button
body: <p>I'm having some issues with a personal website that I'm designing. I would like the list items to be able to scroll to a desired position once pressed. I had previously been using  to do this, but I was unsure if it was better to use JS for this or an anchor. I am ridiculously unskilled in JavaScript, but I couldn't figure out how to get the anchors to call the JS scroller method. This is what I have so far:</p>
  
  <pre><code>&lt;!doctype HTML&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Jackson Singleton&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="CSS/stylesheet.css"&gt;
  
      &lt;div id="heading"&gt;
        &lt;h1&gt;&lt;a href="index.html"&gt;jackson&lt;span id ="lastName"&gt;singleton&lt;/span&gt;&lt;/a&gt;&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div class="navBar"&gt;
        &lt;ul id="navList"&gt;
          &lt;li id="home"&gt;home&lt;/li&gt;
          &lt;li id="port"&gt;&lt;a href&gt;portfolio&lt;/a&gt;&lt;/li&gt;
          &lt;li id="inqr"&gt;&lt;a href&gt;inquiries&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
      &lt;/div&gt;
    &lt;/head&gt;
    &lt;br  /&gt;
    &lt;body&gt;
      &lt;script src="JavaScript/script.js"&gt;&lt;/script&gt;
      &lt;div class="bodyPanel" id="portBody"&gt;
        &lt;h1 id="portHeading"&gt;portfolio&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div class="bodyPanel" id="inqrBody"&gt;
  
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the JS:</p>
  
  <pre><code>var portLink = document.getElementById('port');
  portLink.onclick=function(){
    document.getElementById('portHeading').scrollIntoView();
  }
  </code></pre>
  
  <p>Please help!</p>