nano Function
Main API function. If called as a constructor with an object of parameters it returns a new DOM node wrapped in the API. If passed a DOM node, it returns the node wrapped with the API. If passed a string as an ID it will return the DOM node with the specified ID wrapped in the API. If passed a function, it will be attached to the onload event of the window.
Summary
Element | Function |
Returns | Object|Boolean |
Arguments
obj | Object|String|Function | [required] Can be an object of parameters, a DOM node, an ID as a string, or a function to execute upon window load. |
Example
nano({
parent: nano.body(),
tag: 'div'
});
nano(node);
nano('id');
nano(function() {
alert('Hello World');
});
|
Notes
James Watts 07/08/2010 |
This is an amazing function!
|