locked
how to make hidden link on html? RRS feed

  • Question

  • User430948371 posted

    hey guys! I tried a lot but didn't get success over it can you pls share me the code?

     

    Friday, December 8, 2017 10:26 AM

All replies

  • User475983607 posted

    hey guys! I tried a lot but didn't get success over it can you pls share me the code?

    Using jQuery

    $('#theLinkId").hide();
    Friday, December 8, 2017 11:08 AM
  • User-474980206 posted

    <a href="..." style="display:none">can't see me</a>

    Friday, December 8, 2017 3:58 PM
  • User-1838255255 posted

    Hi chitu143,

    According to your description, i make a sample in three methods that could make link hide, please check: 

    Sample Code:

    <head>
        <title></title>
        <meta charset="utf-8" />
        <style>
            /*method 3*/
            #Tagthree {
            visibility:hidden;
            }
        </style>
        /*method 2*/
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
        <script>
            $(function () {
                $("#Tagtwo").css("visibility", "hidden");
            })
        </script>
    
    </head>
    <body>
        //method1
        <a id="Tagone" href="http://www.google.com" style="visibility:hidden">Tagone</a>
        <a id="Tagtwo" href="http://www.google.com">Tagtwo</a>
        <a id="Tagthree" href="http://www.google.com">Tagthree</a>
    </body>

    if the above code can not help you solve the problem, please correct me! 

    Best Regards,

    Eric Du

    Monday, December 11, 2017 3:24 AM
  • User1119167944 posted

    Thank you for the code!

    Monday, December 11, 2017 8:08 AM
  • User-1701046423 posted

    These links won't be view-able to the user but the search engines would be able to see through it. Personally I would not recommend this. 

    Monday, January 29, 2018 10:39 AM