I was looking over this question and searching google but I didn't find any update, so I am wondering if any of you know anything more recent because the last update on
https://github.com/blairmitchelmore/jquery.plugins was in 2009 and 2010 on https://github.com/cowboy/jquery-bbq
Or any other ideas? I need to add/change/remove parameters to my url
Its easy to do by pure JS.
See this code from www.samaxes.com
var queryParameters = {}, queryString = location.search.substring(1),
re = /([^&=]+)=([^&]*)/g, m;
while (m = re.exec(queryString)) {
queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
}
// Add new parameters or update existing ones
queryParameters['newParameter'] = 'new parameter';
queryParameters['existingParameter'] = 'new value';
location.search = $.param(queryParameters);
Its not flawless. But at least it can give you some idea.
Update 1:
Here is a function I wrote for another answer (cant remember). It works perfect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With