ckhatton
12/8/2014 - 11:07 PM

Grab query parameters from the URL.

Grab query parameters from the URL.

jQuery.extend({
  getQueryParameters : function(str) {
    return (str || document.location.search).replace(/(^\?)/,'').split("&").map(function(n){return n = n.split("="),this[n[0]] = n[1],this}.bind({}))[0];
  }
});