header btn link fix

This commit is contained in:
Arvind Tiwari 2018-04-04 17:55:19 +05:30
parent d3c7149098
commit 7c13def3a2

View file

@ -113,10 +113,10 @@
} else if (href) {
var path = $(this).prop('href').split('#');
var currentPath = window.location.origin + window.location.pathname;
if (!path[1]) {
window.location = href;
} else if (currentPath == path[0]) {
if (currentPath == path[0] && path[1]) {
scrollToElement('#' + path[1]);
} else {
window.location = href;
}
}
});