Readme Formatting

This commit is contained in:
Timothy Warren 2011-07-26 15:38:15 -04:00
parent da22f46b89
commit c1528a0b8b

View File

@ -16,7 +16,7 @@ Browser support: IE8+, Latest versions of Firefox, Chrome, Safari, Opera
* Function: `$_(selector).module.function(params);` * Function: `$_(selector).module.function(params);`
## Official Modules: ## ## Official Modules: ##
### Global ###: Core functions ### Global: Core functions ###
properties: properties:
@ -39,7 +39,7 @@ functions:
Adds 'zip' function to $_. Adds 'zip' function to $_.
### Ajax ###: simple, jQuery-like ajax functions ### Ajax: simple, jQuery-like ajax functions ###
functions: functions:
@ -51,83 +51,83 @@ functions:
Use: Use:
$_.post(url, data_object, callback); $_.post(url, data_object, callback);
### QS ###: querystring parsing and serialization for hashbang strings, and pushState urls ### QS: querystring parsing and serialization for hashbang strings, and pushState urls ###
functions: **functions:**
* Parse: * Parse:
Use: Use:
$_.qs.parse(hb); $_.qs.parse(hb);
* Set: This function will set the hash url if browser doesn't have history.pushState * Set: This function will set the hash url if browser doesn't have history.pushState
Use: Use:
$_.qs.set(key, value); $_.qs.set(key, value);
* Get: Retrieves the value of the key in the url string * Get: Retrieves the value of the key in the url string
Use: Use:
$_.qs.get(key); $_.qs.get(key);
### Store ###: localstorage wrapper with automatic data serialization ### Store: localstorage wrapper with automatic data serialization ###
functions: **functions:**
* Get: * Get:
Use: Use:
$_.store.get(key); $_.store.get(key);
* Set * Set
Use: Use:
$_.store.set(key, value); $_.store.set(key, value);
* getALL: Retreives all localstorage data in raw form * getALL: Retreives all localstorage data in raw form
Use: Use:
$_.store.getAll(); $_.store.getAll();
### Event ###: wrapper for applying events to DOM objects ### Event: wrapper for applying events to DOM objects ###
functions: **functions:**
*Add: *Add:
Use: Use:
$_(selector).event.add(event, callback); $_(selector).event.add(event, callback);
*Remove *Remove
Use: Use:
$_(selector).event.remove(event, callback); $_(selector).event.remove(event, callback);
### DOM ###: Dom manipulation module ### DOM: Dom manipulation module ###
functions: **functions:**
*addClass: *addClass:
Use: Use:
$_(selector).dom.addClass(className); $_(selector).dom.addClass(className);
*RemoveClass: *RemoveClass:
Use: Use:
$_(selector).dom.removeClass(className); $_(selector).dom.removeClass(className);
*show: For setting dom elements as visible. Type defaults as "block", can be set with optional second parameter. *show: For setting dom elements as visible. Type defaults as "block", can be set with optional second parameter.
Use: Use:
$_(selector).dom.show([type]); $_(selector).dom.show([type]);
*hide: Hides the elements matching the selector *hide: Hides the elements matching the selector
Use: Use:
$_(selector).dom.hide(); $_(selector).dom.hide();
*attr: Gets, sets, or removes an attribute from a selector. *attr: Gets, sets, or removes an attribute from a selector.
Use: Use:
Set: $_(selector).dom.attr(attributeName, attributeValue); Set: $_(selector).dom.attr(attributeName, attributeValue);
Get: $_(selector).dom.attr(attributeName); Get: $_(selector).dom.attr(attributeName);
Remove: $_(selector).dom.attr(attributeName, null); Remove: $_(selector).dom.attr(attributeName, null);
*text: Gets or sets the text in between an element's tags *text: Gets or sets the text in between an element's tags
Use: Use:
Set: $_(selector).dom.text(text); Set: $_(selector).dom.text(text);
Get: $_(selector).dom.text(); Get: $_(selector).dom.text();
*css: Sets css styles on the selected element(s) *css: Sets css styles on the selected element(s)
Use: Use:
Set: $_(selector).dom.css(property, value); Set: $_(selector).dom.css(property, value);
Get: $_(selector).dom.css(property); Get: $_(selector).dom.css(property);