Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

modify documentation

  • Loading branch information...
commit ef1a6f6ce535b0efa2f9f36c40c232432dd8d568 1 parent 88ab9d8
Greg Weber authored
Showing with 10 additions and 78 deletions.
  1. +10 −78 jquery.tablelib.js
View
88 jquery.tablelib.js
@@ -1,88 +1,20 @@
/*
- * Copyright (c) 2008 Greg Weber webs.dev gmail
+ * Copyright (c) 2008 Greg Weber greg at gregweber.info
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
- * jquery plugin for working with tables and table rows,
- * * create table objects and table row objects and use convenience methods
- * * serialize objects to table rows and extract objects from table rows
- * * support for saving object properties as row attributes
- * * advanced querying of table rows
+ * jquery plugin for working with tables and table rows
+ * create table objects and table row objects and use convenience methods
+ * serialize objects to table rows and extract objects from table rows
+ * support for saving object properties as row attributes
+ * advanced querying of table rows
*
- * plugin dependent on lib/iterator.js (included in tarball)
- * <code>
- *
- * <table>
- * <thead>
- * <tr>
- * <th>column1</th>
- * <th>column2</th>
- * </tr>
- * </thead>
- * </table>
- *
- * $.table('#my-table').objs() // == []
- *
- * $.table('#my-table').save( [{col1 : val1, col2 : val2},{col1 : val3, col2 : val4}] )
- * <table>
- * <thead>
- * <th>
- * <td>column1</td>
- * <td>column2</td>
- * </th>
- * </thead>
- * <tbody>
- * <tr>
- * <td>val1</td>
- * <td>val2</td>
- * </tr>
- * <tr>
- * <td>val3</td>
- * <td>val4</td>
- * </tr>
- * </tbody>
- * </table>
- *
- * $.table('#my-table').objs() // [{col1 : val1, col2 : val2},{col1 : val3, col2 : val4}]
- *
- * // querying example
- * $.table('#my-table').objs( {column1 : val1}} ) // [{col1 : val1, col2 : val2}]
- * $.table('#my-table').rows( {column1 : val1}} ) // jQuery object with just the first row
+ * documentation at http://gregweber.info/projects/tablelib
+ * also in the source
*
- * </code>
- *
- * API OVERVIEW - more documentation in the code
- * Creating table objects: two ways
- * $('#my-table').table() == $.table('table')
- * A reference to the jQuery object that refers to the table is available through the use of '$'
- * $.table('#my-table').$ == $('#my-table')
- *
- * WARNING!!
- * This plugin is inteded to work with a single table or row!
- * it is untested for a jQuery object that contatins multiple tables or rows!
- * always use id selectors to ensure only one table or row has been selected
- *
- * Creating row objects: two ways, two kinds of rows
- * $('#my-row').row() == $.row('table')
- * $('#my-row').headRow() == $.headRow('table')
- * A reference to the jQuery object that refers to the row is available through the use of '$'
- * $.row('#my-row').$ == $('#my-row')
- *
- * Additional table functions:
- * titles: returns an array of text values for the (last) table head row
- * clear_rows: removes any table body rows
- * head_row == $.headRow( this.$.find("thead > tr:last") )
- * parse: function called when creating table objects
- * by default tries to parse a float as a float instead of as a string
- *
- * Additional row functions:
- * tds or ths: get a jQuery object for the table cells
- * td or th: get a jQuery object for an individual table cell
- * at: retrieve text for an individual table cell
- * transfer_to : transfer a row to a different table
- * to_object : convert a row to an object
-*/
+ * plugin dependent on lib/iterator.js (included in tarball)
+ */
// support both .table() interface and $.table(selector) interface
jQuery.fn.table = function(jq){
Please sign in to comment.
Something went wrong with that request. Please try again.