Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Pull url parameters
var parameters = (function (src) {
var params = {}, qryStr = src.split('?')[1];
qryStr && $.each(qryStr.split('&'), function (i, p) {
ps = p.replace(/\/$/, '').split('=');
var k = ps[0].replace(/^\?/, '');
params[k] = ps[1] || true;
return params;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.