Skip to content

dmorita00/fixed-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fixed-table

Display a table with fixed columns and rows on your web site.

DEMO

https://dmorita00.github.io/fixedTable

Install

  • Github: Clone or Download
  • CDN:
    • CSS: Insert below code in the <head> tag.
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/dmorita00/fixed-table@0.0.10/dist/style.css">
  • JS: Insert below code in the bottom of the <body> tag.
<script src="https://cdn.jsdelivr.net/gh/dmorita00/fixed-table@0.0.10/dist/index.js"></script>

How to use

For fixedTableInit, set the below arguments and call the method.

  • div tag id name
  • Header value
  • Row value
<div id="fixed-table" style="width: 500px; height: 200px;"></div>
<script src="https://cdn.jsdelivr.net/gh/dmorita00/fixed-table@0.0.8/dist/index.js"></script>
<script>
  if (window?.fixedTableInit) {
    window.fixedTableInit(
      "fixed-table",
      [
        'Name     ',
        'Gender ',
        'Job     ',
        'Role     ',
        'Address          ',
        'Phone          ',
      ],
      [
        ['テスト 太郎1', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎2', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎3', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎4', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎5', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎6', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎7', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
        ['テスト 太郎8', '男', '自営業', 'なし', '東京都XXXXXXXXXXXX', '080-XXXX-XXXX'],
      ]
    );
  }
</script>

That’s all.

License

MIT

Author

dmorita00

Keywords

fixed-cell fixed-column fixed-table typescript

To close

Thank you for watching my repo.

About

The column and rows fixed your page.

Resources

Stars

Watchers

Forks

Packages

No packages published