How to remove a specific href from a top-menu link in Magento 2 The Next CEO of Stack...

Novel about a guy who is possessed by the divine essence and the world ends?

Why do variable in an inner function return nan when there is the same variable name at the inner function declared after log

Bold, vivid family

Can you replace a racial trait cantrip when leveling up?

Why don't programming languages automatically manage the synchronous/asynchronous problem?

How to avoid supervisors with prejudiced views?

How do scammers retract money, while you can’t?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

sp_blitzCache results Memory grants

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

Does it take more energy to get to Venus or to Mars?

Interfacing a button to MCU (and PC) with 50m long cable

What happens if you roll doubles 3 times then land on "Go to jail?"

Make solar eclipses exceedingly rare, but still have new moons

How does the Z80 determine which peripheral sent an interrupt?

Unreliable Magic - Is it worth it?

Are there any limitations on attacking while grappling?

Can I equip Skullclamp on a creature I am sacrificing?

Why didn't Khan get resurrected in the Genesis Explosion?

Several mode to write the symbol of a vector

How to count occurrences of text in a file?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Why do airplanes bank sharply to the right after air-to-air refueling?

Why do remote companies require working in the US?



How to remove a specific href from a top-menu link in Magento 2



The Next CEO of Stack OverflowHow to remove the domain from the start of category in navigation menureplace line by bullets before category lists in dropdown menuHow to remove body class from specific page?Display level 3 submenus on level 1 hover - Magento 2 menuHow to remove header or footer from modal popup in magento 2?Magento2.2.4: The top menu not showing to the product detail pageMagento2 add a cms page link to menuHow to remove a specific href from a top-menu link in MagentoMagento2 : How to remove details from shipment print shipping labelHow to add new custom dynamic link in magento2 top header links?












0















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?










share|improve this question





























    0















    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?










    share|improve this question



























      0












      0








      0








      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?










      share|improve this question
















      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?







      magento2 php javascript css megamenu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 43 mins ago









      Teja Bhagavan Kollepara

      3,01241949




      3,01241949










      asked Sep 5 '18 at 10:21









      darkattackdarkattack

      898




      898






















          2 Answers
          2






          active

          oldest

          votes


















          1














          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"





          share|improve this answer

































            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:
            list.push(nodes[x]);
            }
            }
            console.log(list);


            let me know . thanks






            share|improve this answer


























            • can you tell me where is located file?

              – darkattack
              Sep 5 '18 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 .

              – Ramesh Chauhan
              Sep 6 '18 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 '18 at 10:07












            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f240913%2fhow-to-remove-a-specific-href-from-a-top-menu-link-in-magento-2%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            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"





            share|improve this answer






























              1














              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"





              share|improve this answer




























                1












                1








                1







                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"





                share|improve this answer















                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"






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 43 mins ago









                Teja Bhagavan Kollepara

                3,01241949




                3,01241949










                answered Sep 5 '18 at 10:49









                Ramesh ChauhanRamesh Chauhan

                335




                335

























                    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:
                    list.push(nodes[x]);
                    }
                    }
                    console.log(list);


                    let me know . thanks






                    share|improve this answer


























                    • can you tell me where is located file?

                      – darkattack
                      Sep 5 '18 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 .

                      – Ramesh Chauhan
                      Sep 6 '18 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 '18 at 10:07
















                    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:
                    list.push(nodes[x]);
                    }
                    }
                    console.log(list);


                    let me know . thanks






                    share|improve this answer


























                    • can you tell me where is located file?

                      – darkattack
                      Sep 5 '18 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 .

                      – Ramesh Chauhan
                      Sep 6 '18 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 '18 at 10:07














                    0












                    0








                    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:
                    list.push(nodes[x]);
                    }
                    }
                    console.log(list);


                    let me know . thanks






                    share|improve this answer















                    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:
                    list.push(nodes[x]);
                    }
                    }
                    console.log(list);


                    let me know . thanks







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Sep 5 '18 at 11:25









                    Ansar Husain

                    1,705218




                    1,705218










                    answered Sep 5 '18 at 10:55









                    Ramesh ChauhanRamesh Chauhan

                    335




                    335













                    • can you tell me where is located file?

                      – darkattack
                      Sep 5 '18 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 .

                      – Ramesh Chauhan
                      Sep 6 '18 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 '18 at 10:07



















                    • can you tell me where is located file?

                      – darkattack
                      Sep 5 '18 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 .

                      – Ramesh Chauhan
                      Sep 6 '18 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 '18 at 10:07

















                    can you tell me where is located file?

                    – darkattack
                    Sep 5 '18 at 15:36





                    can you tell me where is located file?

                    – darkattack
                    Sep 5 '18 at 15:36




                    1




                    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 .

                    – Ramesh Chauhan
                    Sep 6 '18 at 6:00







                    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 .

                    – Ramesh Chauhan
                    Sep 6 '18 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 '18 at 10:07





                    one more question about this href="javascript:void" i put on db here but after reindex it rewrited ... prntscr.com/kr8rx5

                    – darkattack
                    Sep 6 '18 at 10:07


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f240913%2fhow-to-remove-a-specific-href-from-a-top-menu-link-in-magento-2%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...