jQuery Plugin To Toggle Visibility Of Table Columns - ASH
File Size: | 7.59 KB |
---|---|
Views Total: | 2097 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
ASH (Avoid Selectors Hell) is an extremely lightweight and cross-browser jQuery plugin that provides several methods to toggle the visibility of your table columns. Also provides a Vanilla JavaScript version which can be implement on your web project without any dependencies.
How to use it:
1. Load the jQuery ASH (Avoid Selectors Hell) plugin after you've loaded jQuery JavaScript library in the document.
<script src="//code.jquery.com/jquery-2.2.0.min.js"></script> <script src="ash.js"></script>
2. Hide a specified column of your html table.
$('table').hideColumn(3);
3. Toggle the visibility of a specified table column.
$('table').toggleColumn(3, 'fast');
4. Show the hidden table column.
$('table').showColumn(3, 400);
5. Get a specified table column.
$('table').getColumn(3).addClass('active');
This awesome jQuery plugin is developed by ensaier. For more Advanced Usages, please check the demo page or visit the official website.