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?

2 Answers 2


For your query : I don't want to use href="#" any suggest?

for this you can use href differently like

href="javascript:void"  or href="javascript: return 0"

This is the way you can modify anchor tag and remove href attribute in selected dom .

var list = [];
var nodes = document.getElementsByTagName("*");
// iterate over every node in the document....SLOOOW
for(var x = 0; x < nodes.length; x++){
  // only nodes with the class "progressIndicator":
  if(nodes[x].className == "progressIndicator"){
    // add to array:

let me know . thanks

  • can you tell me where is located file?
    – darkattack
    Sep 5, 2018 at 15:36
  • 1
    you can add this js in footer and you need to modify this according to your need. this above code is example you can implement your functionality required. in place of document.getElementByTagName use document.getElementsById("menuid"); so that you focus on particular menu . Next you will have to match className what ever you use in li elements . for example we have suggested you "progressIndicator" this is a class . Sep 6, 2018 at 6:00
  • one more question about this href="javascript:void" i put on db here but after reindex it rewrited ... prntscr.com/kr8rx5
    – darkattack
    Sep 6, 2018 at 10:07

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.