header btn link fix
This commit is contained in:
parent
d3c7149098
commit
7c13def3a2
1 changed files with 3 additions and 3 deletions
|
@ -113,10 +113,10 @@
|
||||||
} else if (href) {
|
} else if (href) {
|
||||||
var path = $(this).prop('href').split('#');
|
var path = $(this).prop('href').split('#');
|
||||||
var currentPath = window.location.origin + window.location.pathname;
|
var currentPath = window.location.origin + window.location.pathname;
|
||||||
if (!path[1]) {
|
if (currentPath == path[0] && path[1]) {
|
||||||
window.location = href;
|
|
||||||
} else if (currentPath == path[0]) {
|
|
||||||
scrollToElement('#' + path[1]);
|
scrollToElement('#' + path[1]);
|
||||||
|
} else {
|
||||||
|
window.location = href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue