Старт

This commit is contained in:
2023-11-07 19:51:49 +06:00
commit 86542a157f
5002 changed files with 199551 additions and 0 deletions

35
assets/js/main.js Normal file
View File

@ -0,0 +1,35 @@
$(document).ready(function() {
/* ======= Fixed header when scrolled ======= */
$(window).bind('scroll', function() {
if ($(window).scrollTop() > 0) {
$('#header').addClass('header-scrolled');
}
else {
$('#header').removeClass('header-scrolled');
}
});
/* ======= Scrollspy ======= */
$('body').scrollspy({ target: '#header', offset: 100});
/* ======= ScrollTo ======= */
$('a.scrollto').on('click', function(e){
//store hash
var target = this.hash;
e.preventDefault();
$('body').scrollTo(target, 800, {offset: -50, 'axis':'y'});
//Collapse mobile menu after clicking
if ($('.navbar-collapse').hasClass('in')){
$('.navbar-collapse').removeClass('in').addClass('collapse');
}
});
});