Question

So far I've found Address (port of SWFaddress?) and BBQ. Which other plugins that provide 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!

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top