Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.53 KB

README.md

File metadata and controls

46 lines (38 loc) · 1.53 KB

Purpose

Pure javascript plugin with non intrusive data in <table> in order to filter and sort

Requirements

None !

Features

  • Add filter <input> in header
  • Add sort <img> in header
  • No inject data in <table> to work, only the id table
  • No jQuery requirement

Installation

<script type="text/javascript" src="smartable.js"></script>

Usage

var sortFilterTable = new smartab({
  tabId : '#table',
  linkUpSort : 'up-sort.png', //default
  linkDownSort : 'down-sort.png', //default
  linkNoSort : 'img/sort.png', //default
  widthFilter : 100, //default
  unsortCols : [1],
  unfilterCols : [1]
});
sortFilterTable.addHeader();

Options

  • tabId : table identifier
  • linkUpSort : up sort image
  • linkDownSort : down sort image
  • linkNoSort : general sort image
  • widthFilter : width of <input> filter in px
  • unsortCols : list of column number don't sortable
  • unfilterCols : list of column number don't filterable

Browser support

Chrome Firefox IE Opera Safari
? Latest ✔ ? ? ?