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