I have a variable but I can't use it the way I want, please help!!
var test = window.location.hash;
$('div').load("test.php?id="+test);
The request keeps on being :
XHR finished loading: "http://localhost/test-site/test.php?id=".
and ignores my variable...
testcontains something?testisn't blank? Tryconsole.log(test)window.location.hashwill begin with a#symbol, if it contains anything at all. You should strip it by adding.substr(1).