Fix: Scroll down button not working
This commit is contained in:
parent
d7ec721045
commit
23b195abe7
|
@ -7,17 +7,14 @@
|
|||
{{ block "header" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
{{ block "hero" . }}{{ end }}
|
||||
|
||||
<section id="start">
|
||||
{{ block "body" . }}
|
||||
<section id="body-wrapper" class="section">
|
||||
<section class="container {{ .Site.Params.GridSize }}">
|
||||
{{ block "content" . }}{{ end }}
|
||||
</section>
|
||||
{{ block "body" . }}
|
||||
<section id="body-wrapper" class="section">
|
||||
<section class="container {{ .Site.Params.GridSize }}">
|
||||
{{ block "content" . }}{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ block "footer" . }}
|
||||
|
|
|
@ -36,7 +36,7 @@ jQuery(document).ready(function($){
|
|||
|
||||
//Smooth scroll to start
|
||||
$('#to-start').click(function(){
|
||||
var start_y = $('#start').position().top;
|
||||
var start_y = $('#to-start').position().top + $('#to-start').height();
|
||||
var header_offset = 45;
|
||||
window.scroll({ top: start_y - header_offset, left: 0, behavior: 'smooth' });
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue