Change href file but not query string with jQuery
<p>I'd like users with <a href="http://en.wikipedia.org/wiki/JavaScript" rel="nofollow">JavaScript</a> enabled to see page results.php.
Users with JavaScript disabled should see results_d.php.</p>

<p>To do this I'm initially displaying my links with results_d.php.
Then by using JavaScript to change the destination in the links, only the users with JavaScript enabled will see the rich content.</p>

<p>There are a few questions on here about using <a href="http://en.wikipedia.org/wiki/JQuery" rel="nofollow">jQuery</a> to change the whole href destination, but how can I just change the file name and keep the query string as it is?</p>

<p>I was thinking something like this, but it's not working...</p>

<pre><code>$(document).ready(function()
{
    $('a').attr('href').replace('results_d', 'results');
});
</code></pre>
