jQuery(document).ready(function($){
$('a[href*="#"]').on('click', function(e) {
if($($(this).attr('href')).length > 0) {
e.preventDefault()
$('html, body').animate(
{
scrollTop: $($(this).attr('href')).offset().top,
},
500,
'linear'
)
}
})
});