jQuery历史插件 [英] jQuery History Plugin

查看:130
本文介绍了jQuery历史插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些不同的jQuery历史插件有一个比其他任何一个更好...

There are a few different jQuery history plugins out there is one better than any of the others...

我正在尝试决定使用哪一个,任何想法或任何其他尝试:

I'm trying to decide which one to go with, any thoughts or any others to try:

  • http://www.balupton.com/projects/jquery-history
  • http://tkyk.github.com/jquery-history-plugin
  • http://plugins.jquery.com/project/history

推荐答案

我不确定你要做什么,但我假设你想使用哈希标签来控制像Twitter这样的页面加载和Facebook。

I'm not exactly sure what you are trying to do, but I'm assuming you want to use hash tags to control page loads like Twitter and Facebook.

如果是这种情况,请查看这篇文章: https://开头stackov erflow.com/questions/116446/what-is-the-best-back-button-jquery-plugin

If that's the case check out this post: https://stackoverflow.com/questions/116446/what-is-the-best-back-button-jquery-plugin

编辑:

以下是该帖子的建议内容:

Here's what was suggested on that post:

  • Asual: http://www.asual.com/jquery/address/
  • jQuery BBQ: http://benalman.com/projects/jquery-bbq-plugin/
  • History: http://plugins.jquery.com/project/history
  • jQuery hashchange: http://benalman.com/projects/jquery-hashchange-plugin/
  • ReallySimpleHistory: http://code.google.com/p/reallysimplehistory/

Pe遗憾的是,我建议使用Ben Alman的jQuery BBQ,因为它是跨浏览器并且非常易于使用。基本上:

Personally, I'd suggest going with Ben Alman's jQuery BBQ as it is cross-browser and very easy to use. Basically:

$(window).bind('hashchange', function(e) {
    // Get the hash (fragment) as a string, with any leading # removed. Note that
    // in jQuery 1.4, you should use e.fragment instead of $.param.fragment().
    var url = $.param.fragment();
});

资料来源: http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/

另一个受欢迎的是Sammy.js( http://code.quirkey.com/ sammy / )这实际上是Twitter使用的。

Another popular one is Sammy.js (http://code.quirkey.com/sammy/) this is actually what Twitter uses.


  • Christian

这篇关于jQuery历史插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆