jquery-resizable-columns

WebJar for jquery-resizable-columns

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

jquery-resizable-columns
Last Version

Last Version

0.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

jquery-resizable-columns
WebJar for jquery-resizable-columns
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dobtco/jquery-resizable-columns

Download jquery-resizable-columns

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/jquery-resizable-columns/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>jquery-resizable-columns</artifactId>
    <version>0.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/jquery-resizable-columns/
implementation 'org.webjars.npm:jquery-resizable-columns:0.2.3'
// https://jarcasting.com/artifacts/org.webjars.npm/jquery-resizable-columns/
implementation ("org.webjars.npm:jquery-resizable-columns:0.2.3")
'org.webjars.npm:jquery-resizable-columns:jar:0.2.3'
<dependency org="org.webjars.npm" name="jquery-resizable-columns" rev="0.2.3">
  <artifact name="jquery-resizable-columns" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='jquery-resizable-columns', version='0.2.3')
)
libraryDependencies += "org.webjars.npm" % "jquery-resizable-columns" % "0.2.3"
[org.webjars.npm/jquery-resizable-columns "0.2.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

jquery-resizable-columns

Resizable table columns for jQuery. Live Demo

New and Improved! Now tested and working on Chrome & Firefox (Mac + Windows), and IE 9 + 10. Other browsers might work too, just haven't had time to check.

Size: < 8kb minified

Dependencies

  • jQuery
  • store.js (or anything similar) for localStorage persistence.

Simple Usage

<table>
  <thead>
    <tr>
      <th>#</th>
      <th>First Name</th>
      <th>Last Name</th>
      <th>Username</th>
    </tr>
  </thead>
  <tbody>
    ...
  </tbody>
</table>

<script>
  $(function(){
    $("table").resizableColumns();
  });
</script>

Persist column sizes

To save column sizes on page reload (or js re-rendering), just pass an object that responds to get and set. You'll also have to give your <table> a data-resizable-columns-id attribute, and your <th>s data-resizable-column-id attributes.

<script src="libs/jquery.js"></script>
<script src="libs/store.js"></script>
<script src="jquery.resizableColumns.js"></script>

<table data-resizable-columns-id="demo-table">
  <thead>
    <tr>
      <th data-resizable-column-id="#">#</th>
      <th data-resizable-column-id="first_name">First Name</th>
      <th data-resizable-column-id="last_name">Last Name</th>
      <th data-resizable-column-id="username">Username</th>
    </tr>
  </thead>
  <tbody>
    ...
  </tbody>
</table>

<script>
  $(function(){
    $("table").resizableColumns({
      store: store
    });
  });
</script>

License

MIT

Credits

There's various versions of this plugin floating around the internet, but they're all outdated in one way or another. Thanks to http://robau.wordpress.com/2011/06/09/unobtrusive-table-column-resize-with-jquery/ for a great starting point.

org.webjars.npm

Department of Better Technology

We help governments deliver great digital services to the people who depend on them.

Versions

Version
0.2.3