Side navigation
#1207 closed enhancement (wontfix)
Opened May 18, 2007 06:28PM UTC
Closed July 15, 2007 03:21PM UTC
Last modified March 15, 2012 06:21PM UTC
URL Parameter Function
| Reported by: | bgoldman | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.1.4 |
| Component: | core | Version: | 1.1.3 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
I think this would be a good addition to jQuery core, because most people use or might want to use URL parameters in their Javascript. This function makes it really easy:
//returns the requested GET parameter from the URL
url: function(param) {
var regex = '[?&]' + param + '=([^]*)';
var results = (new RegExp(regex)).exec(window.location.href);
if(results) return results[1];
return '';
}
Attachments (0)
Change History (1)
Changed July 15, 2007 03:21PM UTC by comment:1
| milestone: | 1.1.3 → 1.1.4 |
|---|---|
| resolution: | → wontfix |
| status: | new → closed |
| version: | 1.1.2 → 1.1.3 |
We're currently not planning on adding this to core - however this would make for a fantastic plugin :-)