Without manually assigning an ID to each href, the goal would be to change the URLs for both hrefs to a different URL
<div class="example">
<p><a href="http://www.google.com/example?test1332">Test Site</a></p>
<p><a href="http://www.google.com/example?test1332">Test Site</a></p>
</div>
This is my jquery attempt which is not working
$(".example").each(function() {
this.setAttribute("href", this.getAttribute("href").replace("http://www.test.com"));
});
This is my fiddle http://jsfiddle.net/n322j/