I have the problem with selecting strings:
var idToChange = $(obj).attr('id').replace('#', '');
window.location = $("'li .' + idToChange + ' a'").attr('href');
This doesn't reload the page but when I do alert('li .' + idToChange + ' a');
I get the correct value, and when I use firebug console to get ('li .' + idToChange + ' a').attr('href');
I also get correct string. I think I am messing something up with quotes during selecting. Can anyone help?