A table is loaded via ajax and is made sortable
Usage
Works with any table
Parameters
| container | Id of the table container. |
| minCols | Minimum number of cols for a row (else we skip this row) |
| atFirstSortBy | By default, sort by this col |
| ascClass | Helper class for <th/> (can help the creation of arrows or something like this) |
| dscClass | Helper class for <th/> |
| selectedClass | Class for the selected row |
| oddClass | Odd class to create stripes |
| evenClass | Even class to creaste stripes |
Example
In the <head> of the html file
<link media="screen" rel="stylesheet" href="css/itable.css" type="text/css"/>
<script src="js/mootools.js" type="text/javascript"></script>
<script src="js/itable.js" type="text/javascript"></script>
1: Simply make a sortable table (which is in ‘idOfTheContainer’)
<script type="text/javascript">
window.addEvent("domready", function() {
new iTable('idOfTheContainer', {tableClass:'border'});
});
</script>
2: If you wish to get the table via ajax
<script type="text/javascript">
window.addEvent("domready", function() {
var myAjax = new Ajax('url/of/the.table', {
method: 'get',
onComplete : function(){new iTable('idOfTheContainer')}.bind(this),
update: 'idOfTheContainer'
}).request();
});
</script>
Require
Core
* Core.js
Class
* Class.js
* Class.Extras.js
Native
* Array.js
* String.js
* Function.js
* Number.js
* Element.js
Element
* Element.Filters.js
* Element.Selectors.js
* Element.Form.js
Remote
* XHR.js
* Ajax.js
About
formcheck.js v.1.0 for mootools v1.1 05 / 2007
by Floor SA (http://www.floor.ch) MIT-style license
Created by Luca Pillonel and David Mignot, last modified by Luca Pillonel 30.05.12
Todo
Class simplify on th -> simplify this cols. Possibility to do others usefull things (class=”currency chf” 3.03 -> 3.50 chf)
Summary
| A table is loaded via ajax and is made sortable |
| |
| |
| |
| |
| |
| |
| |