-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.js
More file actions
34 lines (22 loc) · 802 Bytes
/
custom.js
File metadata and controls
34 lines (22 loc) · 802 Bytes
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
32
33
34
// fecha a navbar ao clicar no link
$(".navbar-nav li a").click(function(event) {
if (!$(this).parent().hasClass('dropdown'))
$(".navbar-collapse").collapse('hide');
});
// smooth scroll
$(document).ready(function() {
//get the header height
var navHeight = $('nav').outerHeight();
$('.nav-link').click(function(e) {
var linkHref = $(this).attr('href');
$('html, body').animate({
scrollTop: $(linkHref).offset().top - navHeight + 5
}, 1000);
e.preventDefault();
});
});
// ekko-lightbox
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});