$(document).ready(function() {
$(".scroll").click(function(e){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
.menu{background:#ff0;}
.section-1{width:100%;height:100vh;background:#F86;}
.section-2{width:100%;height:100vh;background:#F56;}
.section-3{width:100%;height:100vh;background:#F40;}
<header class="container-top">
<section class="container">
<section class="row">
<section class="col-lg-12">
<nav class="menu col-lg-12">
<ul>
<li><a class="scroll" href="#box1">Seção 1</a></li>
<li><a class="scroll" href="#box2">Seção 2</a></li>
<li><a class="scroll" href="#box3">Seção 3</a></li>
</ul>
</nav>
</section>
</section>
</section>
</header>
<section id="box1" class="section-1">
<section class="container">
<section class="row">
<section class="col-lg-12">
<h1> Seção 1</h1>
</section>
</section>
</section>
</section>
<section id="box2" class="section-2">
<section class="container">
<section class="row">
<section class="col-lg-12">
<h2> Seção 2</h2>
</section>
</section>
</section>
</section>
<section id="box3" class="section-3">
<section class="container">
<section class="row">
<section class="col-lg-12">
<h3> Seção 3</h3>
</section>
</section>
</section>
</section>
Good evening,
I'm starting in Bootstrap and am facing some problems, because when I try to use a Jquery effect that works perfectly in other projects ( I do not use Bootstrap ), it works perfectly, but that same effect applied in Bootstrap structure is not working. I would like to know through the experience of colleagues if it is not possible to use these effects only with Jquery? Because at this point I am facing another problem, I am trying to make the scroll soften down when I click on a link that has an anchor, but this effect does not work in any way. Do you know any tutorial or any way I can do the smooth scrolling effect?