jQuery-获取深度链接jQuery地址以使其工作
我真的很想使用jQuery地址插件来深度链接我的ajax网站,但老实说,我很难理解如何设置它 甚至这些例子似乎也不清楚jQuery-获取深度链接jQuery地址以使其工作,jquery,ajax,deep-linking,Jquery,Ajax,Deep Linking,我真的很想使用jQuery地址插件来深度链接我的ajax网站,但老实说,我很难理解如何设置它 甚至这些例子似乎也不清楚 有没有人能举一个简单的例子来说明如何让它工作?我也是第一次这样做的。他们的文档很差,但它是一个非常好的插件 $.address.init(function(event) { }).change(function(event) { // all your application work should be within here. // each time
有没有人能举一个简单的例子来说明如何让它工作?我也是第一次这样做的。他们的文档很差,但它是一个非常好的插件
$.address.init(function(event) {
}).change(function(event) {
// all your application work should be within here.
// each time something changes this will run
// use the api methods to find out what is going on.
event.path // returns the current full path from beyond /#/
event.queryString // returns the query string ex: /#/?page=1
event.value // returns the value /#/Home
// These can all be accessed globally by using $.address.path(), etc
// usage
// example of clicking an a tag set with the ref or href set as a div id
// be sure to set that in the init method above
// Shows the selected div
$('#'+event.value).show();
});
知道如何使用最新的jQuery版本吗?不知道。4年前的Twas:(这是一个解决方案,但降级是一种糟糕的风格=/