views:

164

answers:

1

I am using this plugin: http://plugins.jquery.com/project/query-object

The 'get' and 'toString' methods work fine, but the 'set', 'empty', and 'remove' methods do not work. In the author's demonstration, he only uses 'get' and 'toString', but in his example on the top of the page, he uses the rest of the "nice-to-have" methods.

Anyone run into this before?

Thanks.

+1  A: 

I tried the set method, and it works just fine:

alert($.query.set("section", 5).set("action", "do").toString());

Output:

?section=5&action=do
Guffa
Thanks for the response. I now understand that the functions just return the querystring. Is there a way to dynamically manipulate the querystring after the page has loaded?
Andee
@Andee: No, you can't change the query string of the current document, just as you can't change the URL. You can assign a new query string to the window.Location object, but that means that the page reloads.
Guffa