Created
March 4, 2014 12:53
-
-
Save chenwery/9345939 to your computer and use it in GitHub Desktop.
query-url.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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