有一些不同的 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:
我不确定您要做什么,但我假设您想使用哈希标签来控制页面加载,例如 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://stackoverflow.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
这是该帖子中的建议:
就个人而言,我建议使用 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/项目/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.
这篇关于jQuery 历史插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
用于创建头像的 jQuery/JavaScript 库?jQuery/JavaScript Library for avatar creation?(用于创建头像的 jQuery/JavaScript 库?)
如何做以下掩码输入问题?How to do following mask input problem?(如何做以下掩码输入问题?)
使用 DropKick Javascript 设置值/标签的问题Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 设置值/标签的问题)
如何对 jquery 插件中的私有方法进行单元测试?how to unit-test private methods in jquery plugins?(如何对 jquery 插件中的私有方法进行单元测试?)
stellar.js - 为垂直滚动网站配置偏移量/对齐元素stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 为垂直滚动网站配置偏移量/对齐元素?)
jQuery 屏蔽输入插件.当文本框获得焦点时选择所有jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽输入插件.当文本框获得焦点时选择所有内容)