mirror of
https://github.com/kaboomserver/website.git
synced 2024-11-29 02:35:48 -05:00
17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
$(window).scroll(function() {
|
|
if ($(".navbar").offset().top > 50) {
|
|
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
|
} else {
|
|
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
|
}
|
|
});
|
|
|
|
$(function() {
|
|
$('.page-scroll a').bind('click', function(event) {
|
|
var $anchor = $(this);
|
|
$('html, body').stop().animate({
|
|
scrollTop: $($anchor.attr('href')).offset().top
|
|
}, 1500, 'easeInOutExpo');
|
|
event.preventDefault();
|
|
});
|
|
});
|