JavaScript/jQuery - onhashchange 事件解决方法
在所有浏览器都支持 onhashchange 事件之前,最好的解决方法是什么?
jQuery 有什么东西可以做到这一点吗?或者作为插件?
Until all browsers support the onhashchange event what is the best workaround for this?
Is there something for this in jQuery? or as a plug-in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
如果您正在寻找 iframe 跨域解决方案,这似乎是最强大的:
http://easyxdm.net/wp/
http://www.cakemail.com/the-iframe-cross- domain-policy-problem/
不过,我还没有尝试过,它似乎实施起来有点困难,并且可能无法在所有情况下工作。
If you're looking for an iframe cross domain solution this seems to be the most robust out there:
http://easyxdm.net/wp/
http://www.cakemail.com/the-iframe-cross-domain-policy-problem/
I haven't tried it though and it seems like it could be a bit difficult to implement and might not work in all situations.
不确定这是否是您正在寻找的内容,但值得一试:
http://plugins.jquery.com/project/ba-jquery-hashchange-plugin
Not sure if this is what you're looking for or not but worth a try:
http://plugins.jquery.com/project/ba-jquery-hashchange-plugin
是的,有。
查看这个 jQuery 插件: http://benalman.com/projects/jquery-hashchange-plugin/
Yes there is.
Check out this jQuery plugin: http://benalman.com/projects/jquery-hashchange-plugin/
在所有经过测试的(几乎所有)平台上对我来说工作得很好。
Works fine for me across all tested (damn near all) platforms.
http://benalman.com/projects/jquery-bbq-plugin/
http://benalman.com/projects/jquery-bbq-plugin/
另一个抽象 url 管理的库是 History.js
Another library that abstracts url management is History.js