简体   繁体   English

mmenu不适用于href中的地下站点

[英]mmenu dont work for undersites in a href

i have a problem. 我有个问题。 the cms TYPO3 build ever the url in the a-Tag / href: i use this mobile menu: mmenu.frebsite.nl cms TYPO3会在a-Tag / href中建立网址:我使用此移动菜单: mmenu.frebsite.nl

here the frontend html: 这里是前端html:

<a class="mMenuButton" href="site2.html#menu"></a>

URL after click: http://www.domain.com/site2.html#menu 点击后的网址: http://www.domain.com/site2.html#menu : http://www.domain.com/site2.html#menu

Template HTML - close/open Button: 模板HTML-关闭/打开按钮:

<a class="mMenuButton" href="#menu"></a>

and here the js: 这里的js:

$(document).ready(function() {

$("#menu").mmenu({
    header: {
        add: true,
        update: true,
        title: "Menü / Startseite",
    },
    offCanvas: {
        position: "top",
        zposition: "front"
    }
})  

});

the MMenu works fine on the home-site! MMenu在首页上可以正常运行! How can i remove the "site2.html" ? 如何删除“ site2.html”? thanks 谢谢

link: https://github.com/BeSite/jQuery.mmenu/issues/184 链接: https//github.com/BeSite/jQuery.mmenu/issues/184

我正在努力地诚实地理解您的问题,但是如果您的问题很简单,如您如何删除site2.html或进行更改,则只需使用另一个链接页面将其从href中删除,或替换为#,以便将其保留在同一页...同样,这个问题毫无意义(至少对我而言),因此不确定是否有帮助。

thanks for the answer but i cant del the href. 感谢您的回答,但我无法删除href。 this is the HTML 这是HTML

<a class="mMenuButton" href="#menu"></a>

the href link may not work! href链接可能不起作用! this js remove the link, but than jump the site on the home after click 此js删除了链接,但单击后跳转到首页上的站点

$(".mMenuButton").attr("href", "#menu");

So you dont have access to the html file which contains - <a class="mMenuButton" href="site2.html#menu"></a> is that right ? 因此,您无权访问包含以下内容的html文件- <a class="mMenuButton" href="site2.html#menu"></a>是吗? Just trying to get an understanding sorry. 只是想获得谅解。

mh no, the HTML is only this: 嗯,HTML只是这样:

<a class="mMenuButton" href="#menu"></a>

an the TYPO3 make this: TYPO3做到这一点:

<a class="mMenuButton" href="site2.html#menu"></a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM