Builds table elements with methods to add rows quickly.
Aaron Newton <aaron [dot] newton [at] cnet [dot] com>
| Mootools | Moo.js, <Utilities.js>, Common.js, Array.js, String.js, Element.js, Function.js |
| html. table.js | Builds table elements with methods to add rows quickly. |
| HtmlTable | Builds table elements with methods to add rows quickly. |
| Properties | |
| row | Inserts a new table row. |
| Change Log | $Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/layout.widgets/html.table.js,v $ $Log: html.table.js,v $ Revision 1.3 2007/06/12 20:46:20 newtona added tbody to html.table.js added legacy argument support to Fx.SmoothShow |
Builds table elements with methods to add rows quickly.
| options | (object) a key/value set of options |
| properties | a set of properties for the Table element (defaults to cellpadding: 0, cellspacing: 0, border: 0) |
| rows | (array) an array of row objects (see <HtmlTable.push>) |
| Properties | |
| row | Inserts a new table row. |
Inserts a new table row.
| row | (array) the data for the row. |
Row data can be in either of two formats.
| simple | an array of strings that will be inserted into each table data |
| detailed | an array of objects with definitions for content and properties for each td |
var myTable = new HtmlTable();
myTable.push(['value 1','value 2', 'value 3']); //new row
myTable.push([
{
content: 'value 4',
properties: {
colspan: 2,
className: 'doubleWide',
style: '1px solid blue'
},
{
content: 'value 5'
}
]);
RESULT:
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>value 1</td>
<td>value 2</td>
<td>value 3</td>
</tr>
<tr>
<td colspan="2" class="doubleWide" style="1px solid blue">value 4</td>
<td>value 5</td>
</tr>
</table>
$Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/layout.widgets/html.table.js,v $ $Log: html.table.js,v $ Revision 1.3 2007/06/12 20:46:20 newtona added tbody to html.table.js added legacy argument support to Fx.SmoothShow
Revision 1.2 2007/05/17 19:45:43 newtona product picker: hide() now hides tooltips; onPick passes in a 3rd argument that is the picker stickyWinHTML: fixed a bug with className options for buttons html.table: fixed a bug with className options for buttons
Revision 1.1 2007/05/16 20:09:41 newtona adding new js files to redball.common.full product.picker.js now has no picklets; these are in the implementations/picklets directory ProductPicker now detects if there is no doctyp and, if not, sets the position of the picker to be fixed (no IE6 support) small docs update in element.cnet.js added new picklet: CNETProductPicker_PricePath added new picklet: NewsStoryPicker_Path new file: clipboard.js (allows you to insert text into the OS clipboard) new file: html.table.js (automates building html tables) new file: element.forms.js (for managing text inputs - get selected text information, insert content around selection, etc.)
function $A( array, start, length )
Use to iterate through iterables that are not regular arrays, such as builtin getElementsByTagName calls, arguments of a function, or an object.
function $each( iterable, fn, bind )
returns the element passed in with all the Element prototypes applied.
function $( el )