无法理解History.js,需要简化吗?

问题描述:

我对编程很新,而且我在jQuery的帮助下创建了一个AJAX网站。

I'm fairly new to programming, and I'm making an AJAX site with the help of jQuery.

我已经环顾了一下AJAX历史记录处理程序,并认为History.js似乎是最好的/最新的。

I've looked around a fair bit for an AJAX history handler, and figured that History.js seems to be the best/most up-to-date.

我的菜单按钮每个都有自己唯一的ID(#homeBtn) ,#featureBtn,#pricingBtn),目前看起来像这样:

My menu buttons each have their own unique ID's (#homeBtn, #featuresBtn, #pricingBtn), and currently look like this:

< a href =#homeclass =homeMainMenuButtonid =homeBtn>< div class =homeMainMenuButtonText>主页< / div>< / a>

有人可以给我一个例子(最好是在jsfiddle上)我将如何实现History.js?

Can someone give me an example (preferably on jsfiddle) on how I would implement History.js?

我似乎无法掌握作者给出的任何例子,并且我只需要一个愚蠢的版本= b

I can't seem to grasp any of the examples given by the author, and I simply need a dumbed down version =b

如果您需要更多信息,请告诉我,谢谢!

If you need any more information, please let me know, and thanks!

按照此处的说明操作: https://github.com/browserstate/ajaxify

Follow the instructions here: https://github.com/browserstate/ajaxify

更改指向传统链接的链接 href =#home href =/ home - 确保 http://mywebsite.com/home 有效。这就是优雅的升级。

Change your links to traditional links href="#home" to href="/home" - make sure http://mywebsite.com/home works. This is all about graceful up-gradation.