Answer the question
In order to leave comments, you need to log in
How to make auto scroll for landing page?
Hello!
How to add scrolling effect for lading page for example when I click on "Contacts" automatic scrolling should be.
Thanks in advance to everyone.
Answer the question
In order to leave comments, you need to log in
Take any template with bs3 parallax and look at the code. For example , these can be
$(document).ready(function(){
var offset = 20;
var scroll_to = $("#contacts").offset().top - offset;
$("#to-contacts").click(function(event){
// slow scrolling: duration is 1500 ms
$("html, body").stop().animate({scrollTop: scroll_to}, 1500);
});
});//jQuery
<button id="to-contacts">Go to Contacts</button>
<h1>Header</h1>
<p>Text</p>
<p>Text</p>
<p>Text</p>
<p>Text</p>
<h2 id="contacts">Contacts</h2>
<p>Phone</p>
<p>Email</p>
<p>Address</p>
<img width="400" height="300" alt="Map" />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question