setting location.href does not work from a <a> click
<p>This is code I took over from a colleague who left:</p>

<pre><code>&lt;input type="text" class="value" placeholder="0"&gt;&lt;/span&gt;&lt;br&gt;
&lt;a href="/model/act/id/'.$model-&gt;id.'" class="act act-a" url="/model/act/id/'.$model-&gt;id.'"&gt;Act Now&lt;/a&gt;

&lt;script&gt;
    $('.act-a').click(function(){
        if(parseInt($('.value').val())&gt;0){
            //window.location.href = window.location.origin + $(this).attr('url') + '?r=' + parseInt($('.value').val());
            window.location.replace("www.google.com");
            return true;
        }
        return false;
    });
&lt;/script&gt;
</code></pre>

<p>When I click on the link, I never get redirected to www.google.com. Originally what I want is to execute the commented code, but setting www.google.com to debug, I think to realize that my redirection is being ignored, and instead the original href from the  is used! </p>

<p>How can I set window.location.href when a link has been clicked, adding a GET parameter?</p>
