-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.js
31 lines (27 loc) · 926 Bytes
/
site.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// jQuery to collapse the navbar on scroll
// $(window).scroll(function() {
// if ($(".navbar").offset().top > 50) {
// $(".navbar-fixed-top").addClass("top-nav-collapse");
// } else {
// $(".navbar-fixed-top").removeClass("top-nav-collapse");
// }
// });
// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a').click(function() {
$('.navbar-toggle:visible').click();
});
// remove the focused state after click,
// otherwise bootstrap will still highlight the link
$("a").mouseup(function(){
$(this).blur();
});