I am creating a responsive menu: Codepen Demo
To avoid the page to be reloaded when I click a link I have:
$(\'nav.menu a[href=\"#\"]\').click(functi
And an inline option without jQuery:
<a href="javascript:function f(e){e.preventDefault();}">Link</a>
And don't forget that with this you have already used the "f" name for a function, so don't name other function like this.