据说jQuery历史插件(http://www.mikage.to/jquery/jquery_history.html)可与Chrome一起使用:
http://github.com/tkyk/jquery-history-plugin
支持的浏览器IE6,IE7,IE8,
Firefox3,Safari4,Safari5,Chrome4,
和Chrome5
但是,当我转到上面提到的顶部链接时,如果我单击加载1,加载2,然后加载3,则后退按钮会将URL的哈希部分更改为#2
,但是“ Loaded html:”部分仍然显示“ 3”……有人知道为什么吗?
最佳答案
转到此处以获取当前示例页面:http://www.serpere.info/jquery-history-plugin/samples/
它可以在Chrome中工作;)正如Pointy指出的那样,该页面上的代码不是最新的,有几个changes/fixes in GitHub since then。您可以get the latest source here。
请注意,自该旧页面以来,API发生了变化(为了更好,我认为),例如:$.historyInit
现在是$.history.init
$.historyLoad
现在是$.history.load
等等,see a full list of changes in this commit
关于jquery - jQuery History Plugin可以在Chrome中使用吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3161419/