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

  • SEARCH
  • Home
  • 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 6729337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:16:39+00:00 2026-05-26T10:16:39+00:00

I have an <a> for Log in as <a href=# id=login>Log in</a> . I’d

  • 0

I have an <a> for “Log in” as <a href="#" id="login">Log in</a>.

I’d like to replace the body of the <a> only when the url is on a certain page. How might you go about doing that with jQuery?

Clarification: When I’m at my /login URL, I want to change the <a> from:

<a href="/login">Log in</a>

to

<a href="/signup">Sign up</a>

I have the following jQuery but don’t know how to apply it to the specific link when the user is on a certain page.

$('a#login').html('<a href="/">Sign up</a>');
  • 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-05-26T10:16:40+00:00Added an answer on May 26, 2026 at 10:16 am
    $(function() {
        var certainURL = "the url you want";
        if (window.location === certainURL) {
            $("a#login").attr('href', certainURL);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my homepage I got: <ul id=login> <li> <a id=loginswitch href=./login-page>log-in</a> | </li> <li>
We have multiple log files like database log, weblog, quartzlog in our application. Any
I have a log.txt file on the root of my application. I would like
I have the following script: if (window.location.href.indexOf('env=P')) { env = 'P'; console.log(P); } else
I have a snippet of code such as: $.getJSON(http://mysite.org/polls/saveLanguageTest?url= + escape(window.location.href) + &callback=?, function
In a dialog describing my change log, I'd like to have some links to
I have a little web app that uses the Facebook like widget. This page
I have this very simple page: <html> <head> </head> <body>Handling... <script> var token =
We've faced strange problem. We have log on service, that authenticates user, adds auth
I have a log that is really huge. (millions of rows) LogTable ------- ID

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.