2011-06-14 12:48:24 -04:00
|
|
|
# Keep It Simple JS Library #
|
|
|
|
|
|
|
|
A Minimal, Modular Javascript library for Modern browsers.
|
|
|
|
|
|
|
|
Aims to be fast, small, and easily split into individual modules.
|
|
|
|
|
|
|
|
Browser support: IE8+, Latest versions of Firefox, Chrome, Safari, Opera
|
|
|
|
|
|
|
|
## Basic Use: ##
|
|
|
|
|
2011-06-14 12:54:47 -04:00
|
|
|
* Selector:
|
|
|
|
var x = $(selector);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
2011-06-14 12:54:47 -04:00
|
|
|
* Function:
|
|
|
|
$_.module.function(params);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
## Modules: ##
|
|
|
|
|
|
|
|
**Ajax**: simple, jQuery-like ajax functions
|
|
|
|
|
|
|
|
functions:
|
|
|
|
|
|
|
|
* Get:
|
2011-06-14 12:54:47 -04:00
|
|
|
Use:
|
|
|
|
$_.get(url, data_object, callback);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
* Post:
|
2011-06-14 12:54:47 -04:00
|
|
|
Use:
|
|
|
|
$_.post(url, data_object, callback);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
**QS**: querystring parsing and serialization for hashbang strings, and pushState urls
|
|
|
|
|
|
|
|
functions:
|
|
|
|
|
|
|
|
* Parse:
|
2011-06-14 12:54:47 -04:00
|
|
|
Use:
|
|
|
|
$_.qs.parse(hb);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
* Set: This function will set the hash url if browser doesn't have history.pushState
|
2011-06-14 12:54:47 -04:00
|
|
|
Use:
|
|
|
|
$_.qs.set(key, value);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
* Get: Retrieves the value of the key in the url string
|
2011-06-14 12:54:47 -04:00
|
|
|
Use:
|
|
|
|
$_.qs.get(key);
|
2011-06-14 12:48:24 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|