https://github.com/j7mbo/ajaxtable
OOP JavaScript / jQuery class for handling dynamic data via ajax within tables.
https://github.com/j7mbo/ajaxtable
Last synced: 2 months ago
JSON representation
OOP JavaScript / jQuery class for handling dynamic data via ajax within tables.
- Host: GitHub
- URL: https://github.com/j7mbo/ajaxtable
- Owner: J7mbo
- Created: 2013-07-16T15:54:31.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-20T18:21:38.000Z (almost 12 years ago)
- Last Synced: 2025-01-30T21:30:04.645Z (4 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
AJAXTable
=========OOP JavaScript / jQuery class for handling dynamic data via ajax within tables.
AJAXTable makes it easy to update a table's rows with elements retrieved via AJAX, updating those rows that already exist with new data, and prepending new rows to the table with smooth jQuery animations.
You can view the current example working [here](http://jsbin.com/obixoj/1).
Examples
========**HTML**
**JavaScript**
$(document).ready(function()
{
// Point to a table you have in the DOM
var table = new AJAXTable.Table('js-table');
// Update the row with the id "one"
var row = new AJAXTable.Row('one');
row.addCell(new AJAXTable.Cell('new id'));
row.addCell(new AJAXTable.Cell('new value'));
row.addCell(new AJAXTable.Cell('ignored cell'));
table.addRow(row);
// Add a new row with the id "two"
var row2 = new AJAXTable.Row('two');
row2.addCell(new AJAXTable.Cell('brand'));
row2.addCell(new AJAXTable.Cell('new cell'));
row2.addCell(new AJAXTable.Cell('ignored cell'));
table.addRow(row2);
// Render the table changes
table.render();
});