Skip to content

Instantly share code, notes, and snippets.

@lucagrulla
Created January 21, 2012 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucagrulla/1653543 to your computer and use it in GitHub Desktop.
Save lucagrulla/1653543 to your computer and use it in GitHub Desktop.
get params for URL
function getParamsFrom(url) {
var seq = url.split("?").pop().split("&")
var params = {};
$.each(seq, function(k, v) {
tmp = v.split("=");
params[tmp[0]] = tmp[1];
});
return params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment