This time I will share jQuery Plugin and tutorial about Table Rows Filter Plugin – uiTableFilter, hope it will help you in programming stack.
uiTableFilter is a simple jQuery plugin for filting table rows.
Installation:
2 |
$ yarn add jquery-uitablefilter |
5 |
$ npm install jquery-uitablefilter --save |
How to use it:
1. Download the plugin and place the JavaScript file ‘jquery.uitablefilter.js’ after jQuery.
1 |
< script src = "/path/to/cdn/jquery.slim.min.js" ></ script > |
2 |
< script src = "/path/to/jquery.uitablefilter.js" ></ script > |
2. The JavaScript syntax to filter your HTML table. Possble parameters:
- jq: jQuery object containing table rows. Required.
- phrase: Phrase to search for. Required.
- column: Array of columns to limit search (the column title in the table header).
- ifHidden: callback to execute if one or more elements were hidden.
- tdElem: Specific element within <td> to be considered for searching or to limit search to, default: whole <td>. useful if <td> has more than one elements inside but want to limit search within only some of elements or only visible elements. eg tdElem can be “td span”.
1 |
$.uiTableFilter(jq, phrase, column, ifHidden, tdElem); |
Changelog:
2020-04-20
This awesome jQuery plugin is developed by code-lts. For more Advanced Usages, please check the demo page or visit the official website.