Skip to content

Instantly share code, notes, and snippets.

@JumboLove
Created August 28, 2013 18:31
Show Gist options
  • Save JumboLove/6369527 to your computer and use it in GitHub Desktop.
Save JumboLove/6369527 to your computer and use it in GitHub Desktop.
Get URL param from key
//Returns the value of the URL parameter input key
urlParam: function(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && result[1] || "";
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment