Skip to content

Instantly share code, notes, and snippets.

@morbidcamel101
Created February 4, 2016 19:51
Show Gist options
  • Select an option

  • Save morbidcamel101/16184b52ed4903311fdb to your computer and use it in GitHub Desktop.

Select an option

Save morbidcamel101/16184b52ed4903311fdb to your computer and use it in GitHub Desktop.
var queryParameters = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m;
while (m = re.exec(queryString)) {
queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
}
queryParameters['division'] = divisionId;
location.search = $.param(queryParameters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment