Utility functions

Some utility functions, except for formatting numbers, are provided to produce a "zebra rows" effect. Zebra rows are rows in a table with alternating colors. To produce this effect, you can set a table row to the a particular color, and use the provided functions to set alternating rows to transparent.
  • initZebraRows

    This utility function resets zebra row count. The next call to setZebraRowsHead makes the line transparent. This action must be called before the table where the zebra rows are to be displayed.

  • setZebraRowsHead

    This utility function sets the row to a specific color and ensures that the next call to the same function yields a different color. This function must be used on a repeated row.

  • setZebraRows

    This utility function sets the current row with the same color as the previous setZebraRowsHeadrow.

  • initZebraRowsHead

    This utility function changes the color for the next call to setZebraRowsHead or setZebraRows. This function works like initZebraRows, but does not need be called on a table row.

Example:

For a simple zebra row table, the user can add initZebraRows as a script somewhere before the table, and then add the script setZebraRowsHead to a row under the repeated row.