fix dcl navbar link navigation

This commit is contained in:
Arvind Tiwari 2018-03-22 00:52:59 +05:30
parent db99a40059
commit 049cf5afa2

View file

@ -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;
}
});
}