Created
November 14, 2013 01:07
-
-
Save sdeering/7459482 to your computer and use it in GitHub Desktop.
URL Params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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