我的网站位于http://visualise.ca/,当您通过单击缩略图加载帖子时,它将使用ajax在页面内加载帖子。当您关闭后它使用此代码,以更改URL回http://visualise.ca/无需重新加载页面:需要语法的Window.location.hash帮助
$("#close").live("click", function(event) {
$("#board").fadeOut("slow");
$("#board-wrapper").slideUp("slow");
$("html,body").delay(1000).animate({scrollTop: 0}, 300);
window.location.hash = "";
window.history.pushState(null,null,site_url+"/");
return false;
});
但在IE8它更改回http://visualise.ca/#而不是http://visualise.ca/。有没有办法纠正这一点,并确保它被更改为http://visualise.ca/?
IE8不支持html5历史API,请考虑使用类似https://github.com/balupton/history.js的回退 – anderssonola