2011-06-14 12:48:24 -04:00
# Keep It Simple JS Library #
A Minimal, Modular Javascript library for Modern browsers.
2012-10-04 13:25:09 -04:00
Aims to be fast, small, and easily split into individual modules.
2011-07-21 14:18:10 -04:00
2012-10-04 13:25:09 -04:00
You can create your own library by adding and removing modules from the
src directory, and running the "combine.php" script. This will output a
2011-07-21 14:18:10 -04:00
"kis-custom.js" file. (Be careful, as the script will overwrite any "kis-custom.js"
file that already exists).
2011-06-14 12:48:24 -04:00
2014-09-05 11:57:18 -04:00
Browser support: IE10+, Latest versions of Firefox, Chrome, Safari, Opera
2011-06-14 12:48:24 -04:00
## Basic Use: ##
2011-07-26 14:18:41 -04:00
* Function: `$_(selector).module.function(params);`
2011-06-14 12:48:24 -04:00
2011-11-03 16:04:35 -04:00
### Core Methods ###
2012-10-04 13:25:09 -04:00
2011-07-26 15:26:17 -04:00
**properties:**
2011-07-26 15:29:30 -04:00
2011-07-26 15:26:17 -04:00
* el: The html object returned by the selector function.
2011-07-26 15:29:30 -04:00
2011-07-26 15:26:17 -04:00
**functions:**
2012-10-04 13:25:09 -04:00
2011-07-26 15:26:17 -04:00
* each: For applying changes to every item matched by a selector
2011-10-18 11:08:51 -04:00
2011-11-02 08:39:33 -04:00
$_(selector).each(callback);
2012-10-04 13:25:09 -04:00
Example :
2011-11-02 08:39:33 -04:00
$_(".foo").each(function(e){
2011-07-26 15:26:17 -04:00
$_(e).dom.text(value);
}):
2012-10-04 13:25:09 -04:00
2011-07-26 15:26:17 -04:00
* ext: For extending the library, adds this.el to the object or function supplied
2012-10-04 13:25:09 -04:00
2011-10-18 11:08:51 -04:00
$_.ext("name", functionOrObject);
2012-10-04 13:25:09 -04:00
Example:
2011-10-18 11:08:51 -04:00
$_.ext("zip", function(){ //function });
2011-07-26 15:26:17 -04:00
Adds 'zip' function to $_.
2012-10-04 13:25:09 -04:00
2011-08-10 16:30:36 -04:00
* type: For getting the type of a variable
2012-10-04 13:25:09 -04:00
2011-10-18 11:08:51 -04:00
$_.type(var);
2011-07-26 15:38:15 -04:00
2011-10-18 11:08:51 -04:00
2012-10-04 13:25:09 -04:00
Have a look at the /docs folder included with the library for documentation on the included modules. The development version of the documentation is avaliable at
2011-10-20 17:31:29 -04:00
2012-01-24 08:55:21 -05:00
[http://github.timshomepage.net/kis-js/docs/ ](http://github.timshomepage.net/kis-js/docs/ )
2011-12-12 11:50:20 -05:00
#### Lite Versions ####
There are two lite versions:
1. Lite - Includes only the ajax and events modules
2. Lite-dom - Includes ajax, events, and dom modules
2011-10-24 19:25:15 -04:00
2012-10-04 13:25:09 -04:00