Skip to content

Instantly share code, notes, and snippets.

@sdeering
Created November 14, 2013 01:07
Show Gist options
  • Save sdeering/7459482 to your computer and use it in GitHub Desktop.
Save sdeering/7459482 to your computer and use it in GitHub Desktop.
URL Params
/*
http://www.jquery4u.com/snippets/url-parameters-jquery/
*/
$.urlParam = function(name){
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment