# jquery-sync-table-column-widths

> A jQuery plugin to synchronize table column widths

Latest version **0.4.0** (published 2019-01-10) · Artistic-2.0 license · 0 weekly downloads

## Install

```sh
npm install jquery-sync-table-column-widths
pnpm add jquery-sync-table-column-widths
yarn add jquery-sync-table-column-widths
bun add jquery-sync-table-column-widths
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2019-01-10 |
| First published | 2018-11-06 |
| Weekly downloads | 0 |
| License | Artistic-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 155.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | chocolateboy |
| Maintainers | chocolateboy |
| Keywords | column, columns, jquery, jquery-plugin, plugin, sync, synchronize, table, tables, width, widths |

## Links

- npm: https://www.npmjs.com/package/jquery-sync-table-column-widths
- Repository: https://github.com/chocolateboy/jquery-sync-table-column-widths
- Homepage: https://github.com/chocolateboy/jquery-sync-table-column-widths#readme
- Issues: https://github.com/chocolateboy/jquery-sync-table-column-widths/issues
- npm.io page: https://npm.io/package/jquery-sync-table-column-widths

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [little-emitter](https://npm.io/package/little-emitter.md) ~0.2.0

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2019-01-10
- 0.3.1 — 2019-01-07
- 0.3.0 — 2018-11-22
- 0.2.0 — 2018-11-11
- 0.0.3 — 2018-11-07
- 0.0.2 — 2018-11-07
- 0.0.1 — 2018-11-06

## README

# jquery-sync-table-column-widths

[![Build Status](https://secure.travis-ci.org/chocolateboy/jquery-sync-table-column-widths.svg)](http://travis-ci.org/chocolateboy/jquery-sync-table-column-widths)
[![NPM Version](http://img.shields.io/npm/v/jquery-sync-table-column-widths.svg)](https://www.npmjs.org/package/jquery-sync-table-column-widths)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [NAME](#name)
- [INSTALLATION](#installation)
- [SYNOPSIS](#synopsis)
  - [Load](#load)
  - [Use](#use)
- [TYPES](#types)
  - [Input](#input)
  - [Output](#output)
  - [MasterSelector](#masterselector)
  - [Options](#options)
- [EXPORTS](#exports)
  - [Plugin (default)](#plugin-default)
- [METHODS](#methods)
  - [JQuery#syncColumnWidths](#jquerysynccolumnwidths)
- [DEVELOPMENT](#development)
  - [NPM Scripts](#npm-scripts)
- [COMPATIBILITY](#compatibility)
- [SEE ALSO](#see-also)
- [VERSION](#version)
- [AUTHOR](#author)
- [COPYRIGHT AND LICENSE](#copyright-and-license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# NAME

jquery-sync-table-column-widths - a jQuery plugin to synchronize table column widths

# INSTALLATION

    $ npm install jquery-sync-table-column-widths

# SYNOPSIS

## Load

```javascript
import Plugin from 'jquery-sync-table-column-widths'

const jQuery = require('jquery')
const plugin = Plugin.register(jQuery, options)

plugin.on('sync', table => { ... })
```

## Use

```javascript
$('.my-tables').syncColumnWidths()

// or

$('.my-tables').syncColumnWidths(master)
```

# TYPES

The following types are referenced in the [exports](#exports) below.

## Input

```typescript
type Input = (
    this: HTMLTableCellElement,
    index: number,
    table: HTMLTableElement,
    cell: HTMLTableCellElement
) => string;
```

## Output

```typescript
type Output = (
    this: { index: number; state: Object },
    cell: HTMLTableCellElement,
    table: HTMLTableElement
) => string;
```

## MasterSelector

```typescript
type MasterSelector = JQuery.Selector | HTMLTableElement | ((HTMLTableElement) => boolean)
```

## Options

```typescript
type Options {
    input?: Input,
    output?: Output,
    debug?: boolean,
    master?: MasterSelector,
}
```

# EXPORTS

## Plugin (default)

```javascript
import Plugin from 'jquery-sync-column-widths'

Plugin.register(jQuery, options)
```

# METHODS

## JQuery#syncColumnWidths

**Signature**: syncColumnWidths(jQuery: JQuery, options?: [Options](#options)) => this

# DEVELOPMENT

<details>

## NPM Scripts

The following NPM scripts are available:

- build - compile the plugin and package it for release
- clean - remove temporary files and build artifacts
- test - run the test suite

</details>

# COMPATIBILITY

This plugin should work in any browser supported by jQuery. It has been tested with jQuery 3.3.1,
though it may work with older versions.

# SEE ALSO

* [jQuery](https://www.npmjs.com/package/jquery)

# VERSION

0.4.0

# AUTHOR

[chocolateboy](mailto:chocolate@cpan.org)

# COPYRIGHT AND LICENSE

Copyright © 2018-2019 by chocolateboy.

This is free software; you can redistribute it and/or modify it under the
terms of the [Artistic License 2.0](http://www.opensource.org/licenses/artistic-license-2.0.php).

---
_Source: https://npm.io/package/jquery-sync-table-column-widths · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
