<script type="text/javascript"> jQuery(function( $ ){ // Smooth scrolling when clicking on a hash link $('a[href^="#"]').on('click',function (e) { e.preventDefault(); var target = this.hash; var $target = $(target); if ( $(window).width() > 960 ) { var $scrollTop = $target.offset().top-120; } else { var $scrollTop = $target.offset().top; } $('html, body').stop().animate({ 'scrollTop': $scrollTop }, 900, 'swing'); }); }); </script>
Change top-120 to math with your height of fixed header.