title: HTML onClick go to another div
body: <p>I have a button on my webpage which when onClick I want it to show another div. However when I click the button it will flash in the url that it went to the correct div but then it will immediately redirect back to the main div, #home. </p>
  
  <p>Code for button:</p>
  
  <pre><code>&lt;input type="button" class="flip" value="Redirect To Div" onClick="window.location='#targetDiv'" /&gt;
  </code></pre>
  
  <p>When I click the the button the url will flash:</p>
  
  <p>www.XXXXX.com/#targetDiv </p>
  
  <p>Then go immediately to www.XXXXX.com/#home</p>
  
  <p>Any ideas why it won't display the div?</p>
  
  <p>Thanks</p>