# jquery-querystring
**Repository Path**: mirrors_shlomif/jquery-querystring
## Basic Information
- **Project Name**: jquery-querystring
- **Description**: A jQuery plugin to make working with querystrings a breeze
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-25
- **Last Updated**: 2026-03-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
This plugin attempts to make working with querystrings easier. The primary function exposed is `$.querystring`, which handles both parsing & serialization (depending on the type of argument passed in). A `$.fn.querystring` method is also provided, which makes getting & setting the querystring of `` elements more convenient.
_Currently only the simplest cases work, but the goal is to support nested objects and arrays. Please refer to the test suite for more info._
Basic usage
-----------
Objects can be serialized to a querystring fragment:
$.querystring({name: "John", age:42}); // "name=John&age=42"
Conversely, querystring fragments can be parsed back into objects:
$.querystring("name=John&age=42"); // {name: "John", age:42}
Element methods
---------------
You can access an element's querystring directly:
// Markup: Search for bikes!
$('a').querystring(); // {terms: 'bicycles'}
and modify it, too:
$('a').querystring({perPage: 10});
// Search for bikes!
You'll notice the new parameter was merged into the existing querystring. You can optionally pass a second argument (boolean) indicating if the existing querystring should be cleared:
$('a').querystring({foo: 'bar'}, true);
// Search for bikes!
You can also use this to remove the querystring:
$('a').querystring({}, true);
_Right now only `` tags are supported, but support for `