In my incremental game code someone asked me to replace my anchors with divs or spans. I tried this but then I was no longer able to click on my "tabs" to cycle through content. is there another way to get rid of the anchors so the page does not move down each time an anchored href is clicked.
example index:
<div class="tabs">
<ul>
<li><a href="#locations">LOCATIONS</a></li>
<li><a href="#crafting">CRAFTING</a></li>
<li><a href="#upgrades">UPGRADES</a></li>
<li><a href="#stats">STATS</a></li>
</ul>
example css:
.tabs a {
text-decoration: none;
display: block;
background: #000000;
padding: 0.10em 0.80em;
color: #145266;
width: 6em;
text-align: center;
}
I tried replacing the a with div but then the clickable area became dormant. But when I used the same method to replace the anchored content in the "tabInner" Everything worked fine because all my content inside has an onclick="CONTENT".
Does this mean I have to make an onclick on locations, crafting, upgrades, and stats?
Source Code - http://hexmerchant.github.io/