I have an a
element which has his own href and it works perfectly. The problem is that besides an href
element i want to make an onClick
function, but when i do so, the href
is ignored:
<li><a href="#someSectionOfThePage" onClick={someFunction}>GO TO SECTION</a></li>
Using this syntax, the someFunction
runs, but i'm not being redirected to #someSectionOfThePage
.