Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$url

Encode a data into accessible string for url.
$url( string )
  1. string [string]
    The string will be encoded.

Notes

The replacement of encodeURIComponent(), useful to encode data before submit to server.

Example

HTML code
<button onclick="start_url()">encode data</button>
JavaScript code
function start_url()
{
	var data = "<?><;~!@#$%^&*()_+{}|:\"<>?";

	alert($url(data));
}
Demonstration