How to remove HTML anchor tags from URL?

Good day!
Do a standard anchor:
<a href="#test">test</a>
<h3 id="test">test</h3>

The transition tag #test is recorded in history, if a few of the tags the user to go back it is necessary to first several times to pierce on the history of the transition anchors. How to make so that by pressing the anchor, there was no record in the URL?

At the moment I use this solution
Query("#a1").click(function() {
pagcenter();
 jQuery('html, body').animate({
 scrollTop: jQuery("#a2").offset().top
 }, 1000, 'swing');
 });

Tell me how to change the script so that the armature C1, b1, d1 also can be applied in this design, you do not want to duplicate the scripts.
July 4th 19 at 23:37
1 answer
July 4th 19 at 23:39
I asked this question here 4 times and every time it was deleted - I asked for ruSO and I was given advice that I connected jQuery scroll - and from the URL is gone the grille and ID
Can you provide a link for an example of such design? - clifton.Tromp90 commented on July 4th 19 at 23:42
: Yes, of course - they gave me this as an example : https://css-tricks.com/snippets/jquery/smooth-scro... - Caesar.Keeli commented on July 4th 19 at 23:45
: codepen.io/Geyan/pen/mAEGdW?editors=1010 here is an example - working 100% - Caesar.Keeli commented on July 4th 19 at 23:48
: I this option does not seem suitable, connect libraries from the user and all the rest of the scripts fall. - clifton.Tromp90 commented on July 4th 19 at 23:51

Find more questions by tags HTML