Added offset to Scrollspy in body and JavaScript
This commit is contained in:
parent
af8df94cdb
commit
6039b4ad52
2 changed files with 4 additions and 2 deletions
|
|
@ -14,7 +14,9 @@
|
|||
<!--* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
|
||||
* Code licensed under the Apache License v2.0.
|
||||
* For details, see http://www.apache.org/licenses/LICENSE-2.0.-->
|
||||
<script>$(window).scroll(function(){50<$(".navbar").offset().top?$(".navbar-fixed-top").addClass("top-nav-collapse"):$(".navbar-fixed-top").removeClass("top-nav-collapse")});$(function(){$("a.page-scroll").bind("click",function(b){var a=$(this);$("html, body").stop().animate({scrollTop:$(a.attr("href")).offset().top},1500,"easeInOutExpo",function(){a.blur()});b.preventDefault()})});$(".navbar-collapse ul li a").click(function(){$(".navbar-toggle:visible").click()});</script>
|
||||
<script>
|
||||
$(window).scroll(function(){50<$(".navbar").offset().top?$(".navbar-fixed-top").addClass("top-nav-collapse"):$(".navbar-fixed-top").removeClass("top-nav-collapse")});$(function(){$("a.page-scroll").bind("click",function(b){var a=$(this);$("html, body").stop().animate({scrollTop:$(a.attr("href")).offset().top-50},1500,"easeInOutExpo",function(){a.blur()});b.preventDefault()})});$(".navbar-collapse ul li a").click(function(){$(".navbar-toggle:visible").click()});
|
||||
</script>
|
||||
|
||||
{% if site.google-tracking-id %}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{% include head.html %}
|
||||
|
||||
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
|
||||
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top" data-offset="50">
|
||||
|
||||
{% include navigation.html %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue