开发者

jQuery deep linking plugins (#hash navigation)

开发者 https://www.devze.com 2022-12-13 07:15 出处:网络
So far I\'ve found Address (port of SWFaddress?) and BBQ. Which other plugins that provid开发者_运维问答e this functionality exist, and which is better/standard?

So far I've found Address (port of SWFaddress?) and BBQ. Which other plugins that provid开发者_运维问答e this functionality exist, and which is better/standard?

So far I've only built my own hackish #-reading scripts, but need something that can handle multiple variables, i.e. #user=bob&sortBy=rating.

Any suggestions or opinions are welcome.

Thanks!


SWFAddress and BBQ are both good. If you want to continue to do it on your own, you can use both window.location.hash and window.location.search for the # and the query string respectively.

For example:

var hash = window.location.hash;
var qs = window.location.search.substring(1).split("&"); // this is an array for the QS

That's a bit hacky and for a more robust solution for the query string, you can check out Querystring

0

精彩评论

暂无评论...
验证码 换一张
取 消