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