1

i post before several day this one

Hello I am trying to make 3 items on menu to be not click-able and I want to ask how to remove a specific href from a top-menu link in magento? (I don't want to remove from all menu items just for 3 as you can see here http://prntscr.com/kqtt77) also I don't want to use href="#" any suggest?

well when i set url from admin panel it duplicate the urls... after flush and shows me in db this

<a href="https://url/"https://url/" class="level0 dropdown-

any suggest??? :/

6
  • Do you have any specific class or id for those menu items? Sep 10, 2018 at 10:44
  • nope only id... i put # prntscr.com/ksnoen look the pic but look on db cache prntscr.com/ksnoqw
    – darkattack
    Sep 10, 2018 at 10:56
  • Can you add any extra class to those links where you want no link? Sep 10, 2018 at 12:06
  • i want those url to be not clickable prntscr.com/ksowfz and add custom cursor default
    – darkattack
    Sep 10, 2018 at 12:26
  • For for those you need atleast one unique selector. Can you share your url? Sep 10, 2018 at 12:32

1 Answer 1

0

Two solutions:

  1. You can use JavaScript:Void(0); in your links like : <a href="JavaScript:Void(0);">My menu1</a>

  2. <a id="mymenu1" href="some-link">My menu1</a>
    <script>
        document.getElementById("mymenu1").addEventListener("click", function(event){
            event.preventDefault()
        });
    </script>
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.