Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Parse the querystring with jQuery, returning an object containing index/value pairs
parseQuerystring: function(){
var nvpair = {};
var qs ='?', '');
var pairs = qs.split('&');
$.each(pairs, function(i, v){
var pair = v.split('=');
nvpair[pair[0]] = pair[1];
return nvpair;
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.