空のクエリ文字列の値を確認する必要がありますが、何か間違っています:(たとえば、URLがindex.phpの場合、#homeを開く必要がありますが、index.php?m=1&s=1の場合#page_1_1 を開く
function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
var m = getUrlVars()["m"];
var s = getUrlVars()["s"];
if((m!='')&&(s!='')){
$('#page_'+m+'_'+s+'').show();
}
else{ $('#home').show(); }