Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 11 years ago

#1207 closed enhancement (wontfix)

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:


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 '';

Change History (1)

comment:1 Changed 16 years ago by john

Resolution: wontfix
Status: newclosed

We're currently not planning on adding this to core - however this would make for a fantastic plugin :-)

Note: See TracTickets for help on using tickets.