new utils file for general methods. This first method grabs the query string variables from the URL

This commit is contained in:
Adriaan Wormgoor 2013-08-16 22:23:24 +02:00
parent 7da38d2e98
commit 70b59c923a
1 changed files with 7 additions and 0 deletions

7
js/utils.js Normal file
View File

@ -0,0 +1,7 @@
// http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery
function getURLParameter(name) {
return decodeURI(
(new RegExp('[&?]'+name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
}