Difference between revisions of "Widget:TableFilter"

From DDO Compendium
m (moved the input bar)
(tweak)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>
<script>
$(document).ready(function () {
$(document).ready(function () {
Line 5: Line 6:
$("#filter").on("keyup", function () {
$("#filter").on("keyup", function () {
var value = $(this).val().toLowerCase();
var value = $(this).val().toLowerCase();
$(".filterable tr").filter(function () {
$(".filterable tbody tr").filter(function () {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});

Latest revision as of 19:37, 5 May 2018