1.1.5 • Published 4 years ago

clicktable v1.1.5

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Clicktable (/klɪktəbl/ like clickable) is a lightweight module to help you easily make your table rows act like anchor links.

Installation

First update NPM and install clicktable in your dependencies:

npm i -g npm
npm i --save clicktable

Then require and initialize Clicktable:

const Clicktable = require("clicktable");
const clickMe = new Clicktable();

Now all you need to do is add the data-href attribute to your table rows:

<table>
  <tr>
    <th>Package</th>
    <th>Version</th>
    <th>Language</th>
  </tr>
  <tr data-href="https://www.npmjs.com/package/clicktable">
    <td>Clicktable</td>
    <td>1.1.0</td>
    <td>Javascript</td>
  </tr>
</table>

Done! Your table rows now act like a normal anchor link: Demonstration

Options

Since V1.1.0 Clicktable automatically inserts a default styling. This styling is the same as the user-agent styling of most modern browsers for anchor links and is easily overwritten in your CSS style. If you want to manually shut off the default styling just pass "style": "none" as option.

const clickMe = new Clicktable({
  style: "none"
});
1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago