Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Created December 16, 2014 20:14
Show Gist options
  • Select an option

  • Save tonyfast/f7c69bda4418117bae72 to your computer and use it in GitHub Desktop.

Select an option

Save tonyfast/f7c69bda4418117bae72 to your computer and use it in GitHub Desktop.
Get Query Parameters from url
function getQueryParameters(str) {
// from http://css-tricks.com/snippets/jquery/get-query-params-object/
return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment