Struggling to make an icon in a button

advertisements

Im trying to make the icon im using into a button that when pressed, triggers the navigation bar to open. Here is the HTML:

<div id="fixedBar">
    <h1>Company</h1>
    <a href="#" class="entypo-menu" id="showLeft"></a>
</div>

The class is the icon image and the id triggers the nav bar. The problem is that when I click the icon, the page scrolls back to the top due to the href of '#'.

Im not sure how I can get the icon to not link to anything when clicked.

Thanks!


a href is not needed just use a fake link class

<span class="fake-link" id="fake-link-1"> fake link</span>

.fake-link {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}