why location.href does not work? : <p>I use jquery <br />
Why location.href does not work <br />
This is my code <br /></p>

<pre><code>function RemoveProduct(Seolink) {
        $('#p' + Seolink).remove();
        var LinkToGo = 'localhost:5000/Home/Compare?';
        for (var i = 0; i &lt; $('#CompareSection .hoverable.grey.lighten-2').length; i++) {
            LinkToGo += 'Product=DKP' + $('#CompareSection .hoverable.grey.lighten-2:eq(' + i + ')').attr('id')
                        .substring(1, $('#CompareSection .hoverable.grey.lighten-2:eq(' + i + ')').attr('id').length) + '&amp;';
        }
        LinkToGo = LinkToGo.substring(0, LinkToGo.length - 1);
        location.href = LinkToGo;
        //window.location.href = LinkToGo;
        //document.location.href = LinkToGo;
    }
</code></pre>
