All Projects → terrilldent → Tsorter

terrilldent / Tsorter

Licence: mit
JavaScript Table Sorter using Quick Sort

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Tsorter

Algorithms
CLRS study. Codes are written with golang.
Stars: ✭ 482 (+1105%)
Mutual labels:  sort
Leetcode
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Stars: ✭ 5,619 (+13947.5%)
Mutual labels:  sort
Eloquent Sortable
Sortable behaviour for Eloquent models
Stars: ✭ 914 (+2185%)
Mutual labels:  sort
Datastructureandalgorithms
Write code that run faster, use less memory and prepare for your Job Interview
Stars: ✭ 509 (+1172.5%)
Mutual labels:  sort
Sort Me Sketch
Sort artboards and layers by name
Stars: ✭ 547 (+1267.5%)
Mutual labels:  sort
Dict build
自动构建中文词库:http://www.matrix67.com/blog/archives/5044
Stars: ✭ 599 (+1397.5%)
Mutual labels:  sort
Datastructure
常用数据结构及其算法的Java实现,包括但不仅限于链表、栈,队列,树,堆,图等经典数据结构及其他经典基础算法(如排序等)...
Stars: ✭ 419 (+947.5%)
Mutual labels:  sort
Mapsort
Performant sorting for complex input
Stars: ✭ 37 (-7.5%)
Mutual labels:  sort
Sieve
⚗️ Clean & extensible Sorting, Filtering, and Pagination for ASP.NET Core
Stars: ✭ 560 (+1300%)
Mutual labels:  sort
Stupid Table Plugin
A stupidly small and simple jQuery table sorter plugin
Stars: ✭ 704 (+1660%)
Mutual labels:  sort
Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (+1187.5%)
Mutual labels:  sort
Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: ✭ 23,641 (+59002.5%)
Mutual labels:  sort
Learningmasteringalgorithms C
Mastering Algorithms with C 《算法精解:C语言描述》源码及Xcode工程、Linux工程
Stars: ✭ 615 (+1437.5%)
Mutual labels:  sort
Sorts
The algorithm of sort.Personal site:http://damonare.cn
Stars: ✭ 485 (+1112.5%)
Mutual labels:  sort
Query
Query adds tools to aid the use of Ecto in web settings.
Stars: ✭ 23 (-42.5%)
Mutual labels:  sort
Mixitup
A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more
Stars: ✭ 4,431 (+10977.5%)
Mutual labels:  sort
Phonetic
An iOS App to generate phonetic keys for your Chinese contacts. Written in Swift.
Stars: ✭ 574 (+1335%)
Mutual labels:  sort
Twig Lambda
Lambda expressions for Twig and filters that make use of them
Stars: ✭ 40 (+0%)
Mutual labels:  sort
Sortpem
➿ Sorting utility for PEM files
Stars: ✭ 11 (-72.5%)
Mutual labels:  sort
Table Dragger
Turn your old table to drag-and-drop table with columns and rows sorting like magic!
Stars: ✭ 704 (+1660%)
Mutual labels:  sort

#tsorter

JavaScript Table Sorter using in-place QuickSort.

Full Details: http://www.terrill.ca/sorting/

Provide the table ID and the initially sorted column (optional):

 var sorter = tsorter.create( tableID, initialSortColumn );

##Specifying Data Types

Different data types require different comparisons. Numbers in particular must be compared as numbers and not strings. To aid the script we can hint at the data type by specifying a data-tsorter attribute on the table header cell for each column.

<thead>
    <tr>
         <th data-tsorter="numeric">Year</th>
         <th data-tsorter="numeric">Population</th>
         <th>Country</th>
    </tr>
</thead>

If the data-tsorter attribute is omitted it will default to string comparison.

##Built in Data Types

type description
numeric Treats the table cell value as an integer or float
link Parses the text content of a link tag inside the table cell
input Parses an input tag's value inside the table cell
default by default the textContent of the table cell is used and compared as text

##Custom Data Accessor

It is possible to define your own data accessors. This is particularly useful when there is custom HTML inside a table cell.

 var sorter = tsorter.create('table-id', 0, {
     'image-number': function(row){  
         return parseFloat( this.getCell(row).childNodes[1].nodeValue, 10 );
     }
});

In the above example the 'image-number' type is now available to be used as a data-tsorter attribute value. It will access the text node that follows an image tag inside a cell. An example is available at http://www.terrill.ca/sorting/table_sort_example.html.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].