KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#cli
#claude-code
#codex
#developer-tools
#react
#windows
jquery-prettytable
★ 10
Open GitHub ↗
Make the table looks pretty.
Download README (.md)
Explore Similar Repositories
prettytable.sh
:
A shell script to pretty print tabular data into the terminal
prettytable
:
CLI module for printing tables on console from multiple data sources
prettytable4j
:
CLI module for printing tables on console from multiple data sources
go-prettytable
:
A library for Golang to build a simple text table with a multibyte, doublewidth character support
DeepDive
:
Inspired by Netmiko & Netdev to make scripts run much faster
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
jquery-prettytable
?
Download (.md)
jquery-prettytable ================== >Make your table looks pretty. [](https://travis-ci.org/bilxio/jquery-prettytable) ## Requirements - jQuery 2.1.0+ - Bootstrap 3 ## Usage Enable prettytable via javascript: ```javascript $('.table[data-role=prettytable]').prettyTable(); ``` Set max column width: ```html <table data-role="prettytable"> <thead> <tr> <th data-width="100"> ... ``` > Will apply the min value of `data-width` and dynamic calculated finally. Set column width according on `data-min-width` and auto calculated value: ```html <table data-role="prettytable"> <thead> <tr> <th data-min-width="100"> ... ``` Set fixed column width: ```html <table data-role="prettytable"> <thead> <tr> <th data-fixed-width="100"> ... ``` Set flex column width: ```html <table data-role="prettytable"> <thead> <tr> <th data-width="flex"> ... ``` ### Options Options can be passed via data attributes or JavaScript. > Scroller now only accept `false` or `'x'` |Name |Type|Default|Desciption| |-----|----|-------|----------| |scroller|string or false|false|enable horizontal scroller or not| |fixedPadding|int|20|Reserved width for header column| |iconWidth|int|20|Extra icon width such as question mark| |maxColumnWidth|function|-|-| scroller option example: ```javascript // programming style $('.table[data-role=prettytable]').prettyTable({ scroller: 'x' }); ``` or ```html <!-- conventional style --> <table data-role="prettytable" data-scroller="x"> ... </table> ``` ```javascript $('.table[data-role=prettytable]').prettyTable(); ``` ## Methods - `lock()` freeze mouse wheel, ignore its events - `unlock()` release mouse wheel, restore events - `refresh()` re-adjust columns of table how to invoke? > only get invoked on the first matched jQuery objects. ```javascript var result = $('.table[data-role=prettytable]').prettyTable(METHOD_NAME); ``` ## Events - `lock.pt` triggered when `lock()` method be invoked - `unlock.pt` triggered when `unlock()` method be invoked subscribe event(s): ```javascript $(document.body).on('lock.pt', '.prettytable', function() { // do something... }) ``` ### History - __v0.1.0__ Dec 31, 2014 first release with only kernal features. - __v0.1.1__ Jan 07, 2014 Bug fix - __v0.1.2__ Jan 08, 2014 +Remove underscore.js as a dependency. +Add travis-CI support. +Add `min-width` support. - __v0.1.3__ Jan 09, 2014 +Fixed font calculated bug for firefox browser ## FAQ ### Q1: How to support max width of column? Add an additional attribute to the `<th>` tag, ```html <table class="prettytable" data-role="prettytable"> <thead> <tr> <th data-width=200> ... ``` ## More info - by [Xiong Zhengdong](http://www.billworks.cc) - since Dec 31, 2014