fix dcl navbar link navigation
This commit is contained in:
parent
db99a40059
commit
049cf5afa2
1 changed files with 8 additions and 4 deletions
|
@ -107,10 +107,14 @@
|
|||
var href = $(this).attr('href');
|
||||
$('.navbar-collapse').removeClass('in');
|
||||
$('.navbar-collapse').addClass('collapsing');
|
||||
if ($(href).length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: $(href).offset().top - 50
|
||||
}, 1000);
|
||||
if (href[0] === "#") {
|
||||
if ($(href).length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: $(href).offset().top - 50
|
||||
}, 1000);
|
||||
}
|
||||
} else if (href) {
|
||||
window.location = href;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue