How to select all local links in jQuery
<p>I need to select all local links, regardless of if the start with </p>

<ul>
<li><code>/path/to/page</code></li>
<li><code>http://mydomain.com/path/to/page</code></li>
<li><code>https://mydomain.com/path/to/page</code></li>
</ul>

<p>and replace them with </p>

<ul>
<li><code>/#/path/to/page</code></li>
</ul>

<p>Thanks for your help.</p>

<p>Edit: As pointed out by dvhh in a comment, a better solution would be to target clicks. So sorry, I won't be testing solutions to mark a correct answer. Thanks for your help</p>

<p>Edit 2: Posted a <a href="http://stackoverflow.com/questions/3975818/how-to-change-the-target-of-any-local-link-when-clicked-using-javascript-jquer">new question</a> about doing this via a click.</p>
