Skip to content

ndp-software/align-column

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 

align-column

jQuery table formatting plugin for decimal alignment and other prettifying of table columns.

Features

Transform hard-to-compare right-aligned numeric tables:

to easier to read:

Center based on characters besides a decimal separator:

Scientific tables can be much improved:

Usage

  <script type="text/javascript" src=".../jquery...min.js"></script>
  <script type="text/javascript" src=".../jquery.align-column.js"></script>

To align numeric columns of an HTML table, use:

  $('table').alignColumn(3); // column index

Multiple columns can be aligned at once:

  $('table').alignColumn([4,5]);

By default, columns are aligned by the decimal point (or a best guess as to where it is). To center by some other character or characters:

  $('table').alignColumn(2, {center: ':'});

Examples

License

MIT

References and Related Projects

About

jQuery table formatting plugin for decimal alignment and other prettifying of table columns

Resources

License

Stars

Watchers

Forks

Packages

No packages published