4
我真的想用jQuery地址插件来深度链接我的ajax网站,但说实话,我很难理解如何设置它。jQuery - 获取深层链接jQuery地址工作
即使这些例子似乎并不清楚。
有没有人有一个简单的例子,如何让这个工作?
我真的想用jQuery地址插件来深度链接我的ajax网站,但说实话,我很难理解如何设置它。jQuery - 获取深层链接jQuery地址工作
即使这些例子似乎并不清楚。
有没有人有一个简单的例子,如何让这个工作?
我也是第一次经历这个。他们的文档很差,但它是一个很好的插件。
$.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版本? – kwoxer 2015-02-17 09:07:26
不知道。 Twas 4年前:( – Trevor 2015-02-20 16:21:03
http://stackoverflow.com/questions/28495507/deep-linking-with-ajax-does-not-work-with-latest-jquery-address/28594019#28594019是解决方案,但一个坏风格与降级= / – kwoxer 2015-02-20 17:04:25