Search code examples
javascriptjqueryhtmltypo3typo3-6.2.x

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

here the frontend html:

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

URL after click: http://www.domain.com/site2.html#menu

Template HTML - close/open Button:

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

and here the 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! How can i remove the "site2.html" ? thanks

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


Solution

  • thanks for the answer but i cant del the href. this is the HTML

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

    the href link may not work! this js remove the link, but than jump the site on the home after click

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