jquery selecting manipulated strings
<p>I have the problem with selecting strings:</p>

<pre><code>var idToChange = $(obj).attr('id').replace('#', '');

window.location = $("'li .' + idToChange + ' a'").attr('href');
</code></pre>

<p>This doesn't reload the page but when I do <code>alert('li .' + idToChange + ' a');</code> I get the correct value, and when I use firebug console to get <code>('li .' + idToChange + ' a').attr('href');</code> I also get correct string. I think I am messing something up with quotes during selecting. Can anyone help?</p>
