Sha256: 0f6d98c31e4f671efd154bd43c23f65d8d05716c6b7bddc6d36cbc21091572b0
Contents?: true
Size: 879 Bytes
Versions: 11
Compression:
Stored size: 879 Bytes
Contents
jQuery.parseQuery = function(qs) { var q = (typeof qs === 'string' ? qs : window.location.search); var ret = []; q.replace(/#.*$/,''); q.replace(/([^?&=]+)=?([^&]*)(?:&+|$)/g, function(match, key, value) { ret.push( { 'name': decodeURIComponent(key.replace(/\+/g,' ')), 'value': decodeURIComponent(value.replace(/\+/g,' ')) }); }); return ret; } jQuery.parseQuerySimple = function(querystring) { var q = jQuery.parseQuery(querystring); var ret = {}; jQuery.each(q,function(k,v){ ret[v.name] = v.value; }); return ret; } jQuery.parseFragment = function(querystring) { return window.location.hash; }
Version data entries
11 entries across 11 versions & 1 rubygems