Skip to content
Permalink
Browse files

Onepage_menu is broken on special pages

  • Loading branch information...
TN03 committed May 15, 2019
1 parent c855ba7 commit 0b40b60e5d8a87d9fff9233489446867b64a1dc0
Showing with 1 addition and 20 deletions.
  1. +1 −20 examples/onepage.js
@@ -139,23 +139,6 @@ jQuery(function ($) {
}
}

function isEditMode() {
var menu, anchor;

menu = document.getElementById("xh_adminmenu");
if (menu) {
anchor = menu
.getElementsByTagName("ul")[0]
.getElementsByTagName("li")[0]
.getElementsByTagName("a")[0];
if (anchor.href.match(/&normal$/)) {
return true;
}
} else {
return false;
}
}

function init() {
//Position berichtigen, wenn Seite mit Hash aufgerufen
//und customOffset > 0
@@ -169,10 +152,8 @@ jQuery(function ($) {
//$("a.scrollTo").click(function (e) {
$("ul.onepage_menu a").click(function (e) {
var hash = this.hash;
if (hash.length > 0) {
if (hash.length > 0 && ONEPAGE.isOnepage) {
scrollToId(hash);
}
if (!isEditMode()) {
e.preventDefault();
}
});

0 comments on commit 0b40b60

Please sign in to comment.
You can’t perform that action at this time.