matwonk matwonk - 2 months ago 6x
jQuery Question

Get query string parameters with jQuery

Anyone know of a good way to write a jQuery extension to handle query string parameters? I basically want to extend the jQuery magic

function so I can do something like this:


Which would give me the value "test" in the following URL:

I've seen a lot of functions that can do this in jQuery and Javascript, but I actually want to extend jQuery to work exactly as it is shown above. I'm not looking for a jQuery plugin, I'm looking for an extension to the jQuery method.


JQuery jQuery-URL-Parser plugin do the same job, for example to retrieve the value of search query string param, you can use