Formatting
This commit is contained in:
parent
c1528a0b8b
commit
19de9f1409
40
README.md
40
README.md
@ -18,25 +18,25 @@ Browser support: IE8+, Latest versions of Firefox, Chrome, Safari, Opera
|
|||||||
## Official Modules: ##
|
## Official Modules: ##
|
||||||
### Global: Core functions ###
|
### Global: Core functions ###
|
||||||
|
|
||||||
properties:
|
**properties:**
|
||||||
|
|
||||||
* el: The html object returned by the selector function.
|
* el: The html object returned by the selector function.
|
||||||
|
|
||||||
functions:
|
**functions:**
|
||||||
|
|
||||||
* each: For applying changes to every item matched by a selector
|
* each: For applying changes to every item matched by a selector
|
||||||
Use:
|
Use:
|
||||||
$_(selector).dom.each(callback);
|
$_(selector).dom.each(callback);
|
||||||
|
|
||||||
Example : $_(".foo").dom.each(function(e){
|
Example : $_(".foo").dom.each(function(e){
|
||||||
$_(e).dom.text(value);
|
$_(e).dom.text(value);
|
||||||
}):
|
}):
|
||||||
|
|
||||||
* ext: For extending the library, adds this.el to the object or function supplied
|
* ext: For extending the library, adds this.el to the object or function supplied
|
||||||
Use: $_.ext("name", functionOrObject)
|
Use: $_.ext("name", functionOrObject)
|
||||||
|
|
||||||
Example: $_.ext("zip", function(){ //function });
|
Example: $_.ext("zip", function(){ //function });
|
||||||
Adds 'zip' function to $_.
|
Adds 'zip' function to $_.
|
||||||
|
|
||||||
|
|
||||||
### Ajax: simple, jQuery-like ajax functions ###
|
### Ajax: simple, jQuery-like ajax functions ###
|
||||||
@ -100,34 +100,34 @@ functions:
|
|||||||
|
|
||||||
**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);
|
||||||
|
Loading…
Reference in New Issue
Block a user