I tried using `e.preventDefault();` and `return false;` at the end of the code those didn't help. Here is my code:

```
$('.game-nav-inner-game1 .nav-item a').click(function (){
    $('html,body').animate({
        scrollTop: $(".scrollHere").offset().top - 100
    }, 400);
});

```

And this is my html:

```
<ul class="nav nav-tabs game-nav game-nav-inner game-nav-inner-game1-events" data-game="game1" data-container="events-container">
<li class="nav-item">
    <a class="nav-link" href="#nameofthemap" data-toggle="tab" aria-controls="nameofthemap">
        <img src="{$smarty.const.SITE_ADDR}/resources/img/game1-game/maps/nameofthemap.jpg" class="img-fluid game1-map" />
    </a>
</li>
</ul>
<div class="tab-content w-100">
   <div class="tab-pane fade scrollHere" id="events-container"></div>
</div>

```

The 

I would appreciate if you can help me.