I'm using the materialize tab , the switch works normally, but whenever I click on a tab it moves the page to the top , I do not know why, I think it has to do with the smooth scrolling effect, but I'm not sure
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css" media="screen,projection">
<div style='margin-top: 500px' id='tudo' class="col s12">
<ul class="tabs">
<li class="tab col s4"><a class='active' href="#minhas">Minhas</a></li>
<li class="tab col s4"><a href="#favoritas">Favoritas</a></li>
<li class="tab col s4"><a href="#publicas">Públicas</a></li>
</ul>
<!-- LISTA DE MINHAS -->
<div class="row" id="minhas"></div>
<!-- LISTA FAVORITAS -->
<div class="row" id="favoritas"></div>
<!-- LISTA PÚBLICAS -->
<div class="row" id="publicas"></div>
</div>
<footer>
<!-- Import JQuery.js -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><!--Smoothscrollingeffect--><script>$(document).scroll(function(){$('a[href^="#"]').on('click', function(e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing');
});
});
$(document).ready(function() {
$('.tabs').tabs();
});
</script>
<!-- Import materialize.js-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
</footer>