jQuery replaceWith when url changes
<p>I have an <code>&lt;a&gt;</code> for "Log in" as <code>&lt;a href="#" id="login"&gt;Log in&lt;/a&gt;</code>. </p>

<p>I'd like to replace the body of the <code>&lt;a&gt;</code> only when the url is on a certain page. How might you go about doing that with jQuery?</p>

<p><strong>Clarification:</strong> When I'm at my <code>/login</code> URL, I want to change the <code>&lt;a&gt;</code> from:</p>

<p><code>&lt;a href="/login"&gt;Log in&lt;/a&gt;</code></p>

<p>to</p>

<p><code>&lt;a href="/signup"&gt;Sign up&lt;/a&gt;</code></p>

<p>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.</p>

<pre><code>$('a#login').html('&lt;a href="/"&gt;Sign up&lt;/a&gt;');
</code></pre>
