#sidebar ul {
list-style: none; }
#sidebar ul.features_nav {
- padding: 0 0 24px 0;
- max-height: calc(100vh - 96px);
- overflow-x: auto; }
+ padding: 0 0 24px 0; }
#sidebar ul ul {
- margin: 24px 0 0 0;
+ margin: 0;
padding-left: 0; }
#sidebar ul ul li:last-child {
margin-bottom: 0; }
color: #b71c1c;
border-left: 2px solid #b71c1c;
padding: 0 8px 0 6px; }
- #sidebar ul.features_nav.fixed {
- position: fixed;
- top: 120px; }
.btn-red900 {
color: #fff !important;
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
- $(window).scroll(function () {
- if ($(document).scrollTop() > 40) {
- $("#sidebar ul.features_nav").addClass("fixed");
- } else {
- $("#sidebar ul.features_nav").removeClass("fixed");
- }
- });
-
$('body').scrollspy({ target: '#sidebar', offset: 148 })
+
+ $('a[href^="#"]').on('click', function(event) {
+ var target = $(this.getAttribute('href'));
+ if( target.length ) {
+ event.preventDefault();
+ $('html, body').stop().animate({
+ scrollTop: target.offset().top -150
+ }, 750);
+ }
+ });
});
</script>
{% end block %}
\ No newline at end of file