Difference between revisions of "Table Style Examples"
From Xen
Lars.kurth (talk | contribs) (Created page with "This page contains examples of our table styles == class <em>prettytable</em> == {| class="prettytable" !colspan="6"|Shopping List |- |rowspan="2"|Bread & Butter |Pie |Buns |Da…") |
Lars.kurth (talk | contribs) (→class sortable) |
||
Line 19: | Line 19: | ||
== class <em>sortable</em> == |
== class <em>sortable</em> == |
||
+ | When a list of entries is included in a table on a page, you can use JavaScript to make the table 'sortable'. To do this, just add the "sortable" class to the table declaration: |
||
{| class="sortable" |
{| class="sortable" |
||
− | !colspan="6"|Shopping List |
||
|- |
|- |
||
+ | ! Fruit !! Price |
||
− | |rowspan="2"|Bread & Butter |
||
− | |Pie |
||
− | |Buns |
||
− | |Danish |
||
− | |colspan="2"|Croissant |
||
|- |
|- |
||
+ | | Apples || £0.95 |
||
− | |Cheese |
||
+ | |- |
||
− | |colspan="2"|Ice cream |
||
+ | | Oranges || £0.85 |
||
− | |Butter |
||
+ | |- |
||
− | |Yogurt |
||
+ | | Pears || £1.15 |
||
|} |
|} |
||
+ | You can use this attribute with other table styles. |
||
== class <em>wikitable</em> == |
== class <em>wikitable</em> == |
Revision as of 10:47, 23 June 2013
This page contains examples of our table styles
class prettytable
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
class sortable
When a list of entries is included in a table on a page, you can use JavaScript to make the table 'sortable'. To do this, just add the "sortable" class to the table declaration:
Fruit | Price |
---|---|
Apples | £0.95 |
Oranges | £0.85 |
Pears | £1.15 |
You can use this attribute with other table styles.
class wikitable
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
class zebra
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |