Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive

License

NotificationsYou must be signed in to change notification settings

jstable/JSTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The JSTable is a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive.

The plugin is similar to thejQuery datatables but without the jQuery dependencies.

The implementation is inspired byVanilla-DataTables. Unlike Vanilla-Datatables this implementation is using the in ES6 introducedclasses.
Additionally JSTable includes the possibility for server side rendering, which is inspired byjQuery datatables.

You can get more information about the usage onhttps://jstable.github.io/.

Install

  • Clone thegithub repository
  • Include the stylesheet and JavaScript files from thedist folder:
<link rel="stylesheet" type="text/css" href="/dist/jstable.css">
<script type="text/javascript" src="/dist/jstable.min.js"></script>
  • If the target browser does not support not all ES2015+ features you need to include thees5 version:
<script type="text/javascript" src="/dist/jstable.es5.min.js"></script>
  • If the target browser does not support fetch you need to include the following polyfills:
<script type="text/javascript" src="/dist/polyfill-fetch.min.js"></script>

Initialize

The HTML table needs athead andtbody section.

Example table

<table>    <thead>        <tr>            <th>Name</th>            <th>Country</th>            <th>Date</th>            <th>Number</th>        </tr>    </thead>    <tbody>        <tr>            <td>Norman Small</td>            <td>Tokelau</td>            <td>2020-02-01 07:22:40</td>            <td>8243</td>        </tr>            ...    </tbody></table>

JavaScript

The JSTable can be initialized by passing a reference or a CSS3 selector as string:

let myTable = new JSTable("#basic");

or

let table = document.getElementById('basic');let myTable = new JSTable(table);

Options can be passed as second argument:

let myTable = new JSTable("#basic", {    sortable: true,    searchable: false,    ...});

About

a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2026 Movatter.jp