深层链接与阿贾克斯不能与最新作品 - jQuery的地址能与、地址、链接、作品

2023-09-10 20:24:05 作者:你若是海我便溺亡

我想知道为什么 jQuery的地址是不工作与最新的jQuery verison,也许我在做什么错。我的意思是在下载文件夹中给出的样品运作良好。但它们使用旧的jQuery verison。所以,我认为这是破了最新的,但我不能肯定。

I would like to know why jquery address is not working with the latest jQuery verison, or maybe what I'm doing wrong. I mean the samples given in the download folder are working well. But they are with an older jQuery verison. So I think it's broken with the latest, but I'm not quite sure.

下面一些有关该问题的详细信息jQuery的地址/问题/ 196

Here some more details about that issue:https://github.com/asual/jquery-address/issues/196

另一个问题是,如果有任何其他好的插件的深层链接。我的意思是我希望做的一切在该网站上使用Ajax和保持良好的结构。已经发现的烧烤工具,但depricated。

The other question would be, if there is any other good addon for deep linking. I mean I would like to do everything on that site with Ajax and keeping a good structure. Already found the BBQ tool but that depricated.

推荐答案

首先,你总是应该之前加载的jQuery的 的加载任何jQuery插件。在链接的例子中,你以错误的顺序做。而对于你得到了你的错误很可能这样做是正确的,而测试。

First of all you always should load jQuery before you load any jQuery plugins. In the linked example you do it in the wrong order. But regarding to the error you got you probably did it right while testing.

接下来的问题是, jQuery.address 的利用了 jQuery.browser 因为jQuery的1.9已被删除。为了规避这些问题,使移民方便很多,有一个的jQuery插件迁移提供从旧的jQuery版本缺少的功能。

The next problem is that jQuery.address makes use of jQuery.browser which has been removed since jQuery 1.9. In order to circumvent such issues and make migration a lot easier, there is a jQuery migration plugin that provides missing functions from older jQuery versions.

<script src="jquery-2.1.3.js"></script>
<script src="jquery-migrate-1.2.1.js"></script>
<script src="jquery.address-1.5.js?strict=false&wrap=true"></script>