1
I was trying to get that by clicking on a Link HTML <a></a>
a javascript function is executed, I had a priori the following idea to attach an attribute onclick
on the tag <a>
in this way:
<a href="#" onclick="funcao()">OnClick</a>
However this way there is when being clicked the page back to the top of the scroll.
Question: How to trigger a javascript function without having this scroll (without any effect, transparent to the user)?
<a href="javascript:void(0)" onclick="funcao()">OnClick</a>
, I can’t remember now, but this way it doesn’t work?– Guilherme Lautert
@Guilhermelautert I have not tested in this way :-(
– Ricardo
@Sanction, did not know the Pointer-Events, it was worth the day.
– Tobias Mesquita