Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9143935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:08:48+00:00 2026-06-17T10:08:48+00:00

Basically, I want to do the opposite of this: how do i hide anchor

  • 0

Basically, I want to do the opposite of this: how do i hide anchor text without hiding the anchor

I’d like to be able to have a link on my page which under a certain set of client-side determined conditions would be able to deactivate the link, but still show the text. Is there any way to do this without having two separate elements (one with both the anchor and the text and one with just the text) and then flipping visibility between the two?

EDIT: Sorry, should have clarified. I’d like the link to not be styled like a link when it’s deactivated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:08:49+00:00Added an answer on June 17, 2026 at 10:08 am

    Replace the <a> with a generic <span>, and back again.

    A simple strategy to replace would be:

    1. find the node.
    2. add the replaced node before it
    3. remove the first node

    —

    var node = document.getElementById("example");
    var new_node = document.createElement("a"); // or "span"
    new_node.innerText = text;
    node.parentNode.insertBefore(new_node, node);
    node.parentNode.removeChild(node);
    

    This code isn’t complete, but just to give you an idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically like the opposite of Math.pow() . I want a function which can be
Basically I want to do the opposite of what this guy did... hehe. Python
Basically just the opposite of this question . I want to convert a Class<T>
Basically i want to be able to allow the user to save bookmarks which
I basically want something like: TextView Button Button . . . TextView TextView SeekBar
I basically want to do: git checkout branchA git checkout -b branchB <commit_id> which
I basically want to do this in code: PersonList myPersonList; //populate myPersonList here, not
I basically want to be able to deploy multiple versions of the same EAR
Basically I need the opposite behaviour of the @Test(timeout=X) annotation. The problem I want
I basically want to write a customer logger/tracer which also logs the class and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.