Skip to content

Instantly share code, notes, and snippets.

@chenwery
Created March 4, 2014 12:53
Show Gist options
  • Save chenwery/9345939 to your computer and use it in GitHub Desktop.
Save chenwery/9345939 to your computer and use it in GitHub Desktop.
query-url.js
var qUrl = (function() {
var q = window.location.search;
q = q ? q.split('?')[1].split('&') : [];
var query = {};
jQuery(q).each(function(i) {
var t = q[i].split('=');
query[t[0]] = t[1]
});
return query;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment