Animation - go to section

PHOTO EMBED

Fri May 14 2021 14:51:13 GMT+0000 (Coordinated Universal Time)

Saved by @Sikor

function scrollToSection() {
	jQuery(".go-to-section").on('click tap', function (event) {
		event.preventDefault();
		var goToSection = jQuery(jQuery(this).data('go-to'));
		console.log(goToSection);
		if (goToSection.length) {
			jQuery('html,body').animate({
				scrollTop: goToSection.offset().top - 100
			},
			'slow');
		}
	});
}

//HTML
<a href="#" class="btn btn-primary go-to-section" data-go-to=".section-class-where-you-go">

content_copyCOPY